Class: Songkicky::MetroArea
- Inherits:
-
Object
- Object
- Songkicky::MetroArea
- Defined in:
- lib/metro_area.rb
Instance Attribute Summary collapse
-
#country ⇒ Object
Returns the value of attribute country.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lng ⇒ Object
Returns the value of attribute lng.
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(hash) ⇒ MetroArea
constructor
A new instance of MetroArea.
Constructor Details
#initialize(hash) ⇒ MetroArea
Returns a new instance of MetroArea.
10 11 12 13 14 15 |
# File 'lib/metro_area.rb', line 10 def initialize(hash) @id = hash['id'] @name = hash['displayName'] @state = hash['state']['displayName'] if hash['state'] @country = hash['country']['displayName'] end |
Instance Attribute Details
#country ⇒ Object
Returns the value of attribute country.
4 5 6 |
# File 'lib/metro_area.rb', line 4 def country @country end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/metro_area.rb', line 4 def id @id end |
#lat ⇒ Object
Returns the value of attribute lat.
4 5 6 |
# File 'lib/metro_area.rb', line 4 def lat @lat end |
#lng ⇒ Object
Returns the value of attribute lng.
4 5 6 |
# File 'lib/metro_area.rb', line 4 def lng @lng end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/metro_area.rb', line 4 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/metro_area.rb', line 4 def state @state end |