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
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env
4 5 6 |
# File 'lib/respawn/environment.rb', line 4 def env @env end |
Class Method Details
.default ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/respawn/environment.rb', line 13 def self.default new( ENV.fetch("RUBY_ENV") do ENV.fetch("RAILS_ENV") do ENV.fetch("RACK_ENV", "production") end end, ) end |
Instance Method Details
#other? ⇒ Boolean
9 10 11 |
# File 'lib/respawn/environment.rb', line 9 def other? !test? end |
#test? ⇒ Boolean
5 6 7 |
# File 'lib/respawn/environment.rb', line 5 def test? env == "test" end |