Class: Respawn::Environment
- Inherits:
-
Data
- Object
- Data
- Respawn::Environment
- Defined in:
- lib/respawn/environment.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env:) ⇒ Environment
constructor
A new instance of Environment.
Constructor Details
#initialize(env:) ⇒ Environment
13 14 15 16 17 |
# File 'lib/respawn/environment.rb', line 13 def initialize(env:) ENVIRONMENTS.try!(env) super end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env
10 11 12 |
# File 'lib/respawn/environment.rb', line 10 def env @env end |
Class Method Details
.default ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/respawn/environment.rb', line 25 def self.default new( ENV.fetch("RUBY_ENV") do ENV.fetch("RAILS_ENV", "production") end, ) end |