Class: HeatingEnvironment

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Serialization
Defined in:
app/models/heating_environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_urlObject (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

#keyObject (readonly)

Returns the value of attribute key.



5
6
7
# File 'app/models/heating_environment.rb', line 5

def key
  @key
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'app/models/heating_environment.rb', line 5

def name
  @name
end