Class: Regentanz::Conditions::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/regentanz/conditions/base.rb

Direct Known Subclasses

Current, Forecast

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
12
# File 'lib/regentanz/conditions/base.rb', line 7

def initialize(attributes = {})
  attributes.symbolize_keys!
  attributes.keys.each do |attr|
    self.send(:"#{attr}=", attributes[attr]) if respond_to?(:"#{attr}=")
  end
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



5
6
7
# File 'lib/regentanz/conditions/base.rb', line 5

def condition
  @condition
end

#iconObject

Returns the value of attribute icon.



5
6
7
# File 'lib/regentanz/conditions/base.rb', line 5

def icon
  @icon
end

#styleObject

Returns the value of attribute style.



5
6
7
# File 'lib/regentanz/conditions/base.rb', line 5

def style
  @style
end