Class: GrowViral::Keystore::Configuration
- Inherits:
-
Object
- Object
- GrowViral::Keystore::Configuration
- Defined in:
- lib/keystore/configuration.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(env) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(env) ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 |
# File 'lib/keystore/configuration.rb', line 6 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
5 6 7 |
# File 'lib/keystore/configuration.rb', line 5 def env @env end |
Instance Method Details
#host ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/keystore/configuration.rb', line 10 def host case env.to_sym when :test when :development ENV["GROWVIRAL_KEYSTORE_HOST"] || "http://localhost:3000" when :production ENV["GROWVIRAL_KEYSTORE_HOST"] end end |