Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class Cred
  2.  
  3. def initialize(env)
  4. if [:test, :development, :production, :staging].include?(env)
  5. puts env
  6. @credentials = Rails.application.credentials.send(env)
  7. else
  8. raise("Cred: #{env} is not a defined environment")
  9. end
  10. @credentials
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement