Class: SenroUsecaser::Environment
- Inherits:
-
Object
- Object
- SenroUsecaser::Environment
- Defined in:
- lib/senro_usecaser/configuration.rb
Overview
Environment detection
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
: () -> String.
Instance Method Summary collapse
-
#development? ⇒ Boolean
: () -> bool.
-
#initialize(name) ⇒ Environment
constructor
: (String) -> void.
-
#production? ⇒ Boolean
: () -> bool.
-
#test? ⇒ Boolean
: () -> bool.
-
#to_s ⇒ Object
: () -> String.
Constructor Details
#initialize(name) ⇒ Environment
: (String) -> void
38 39 40 |
# File 'lib/senro_usecaser/configuration.rb', line 38 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
: () -> String
43 44 45 |
# File 'lib/senro_usecaser/configuration.rb', line 43 def name @name end |
Instance Method Details
#development? ⇒ Boolean
: () -> bool
46 47 48 |
# File 'lib/senro_usecaser/configuration.rb', line 46 def development? @name == "development" end |
#production? ⇒ Boolean
: () -> bool
56 57 58 |
# File 'lib/senro_usecaser/configuration.rb', line 56 def production? @name == "production" end |
#test? ⇒ Boolean
: () -> bool
51 52 53 |
# File 'lib/senro_usecaser/configuration.rb', line 51 def test? @name == "test" end |
#to_s ⇒ Object
: () -> String
61 62 63 |
# File 'lib/senro_usecaser/configuration.rb', line 61 def to_s @name end |