Class: HeatingEnvironment
- Inherits:
-
Object
- Object
- HeatingEnvironment
- Includes:
- ActiveModel::Serialization
- Defined in:
- app/models/heating_environment.rb
Instance Attribute Summary collapse
-
#base_product_line_url ⇒ Object
readonly
Returns the value of attribute base_product_line_url.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(environment_name) ⇒ HeatingEnvironment
constructor
A new instance of HeatingEnvironment.
Constructor Details
#initialize(environment_name) ⇒ HeatingEnvironment
Returns a new instance of HeatingEnvironment.
7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/heating_environment.rb', line 7 def initialize(environment_name) if (env_hash = HeatingElementProductLineOption::PUBLIC_ENVIRONMENTS_HASH[environment_name]).present? @name = environment_name @key = env_hash[:key] @base_product_line_url = env_hash[:base_product_line_url] return true else return false end end |
Instance Attribute Details
#base_product_line_url ⇒ Object (readonly)
Returns the value of attribute base_product_line_url.
5 6 7 |
# File 'app/models/heating_environment.rb', line 5 def base_product_line_url @base_product_line_url end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'app/models/heating_environment.rb', line 5 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'app/models/heating_environment.rb', line 5 def name @name end |