Class: Songkicky::MetroArea

Inherits:
Object
  • Object
show all
Defined in:
lib/metro_area.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countryObject

Returns the value of attribute country.



4
5
6
# File 'lib/metro_area.rb', line 4

def country
  @country
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/metro_area.rb', line 4

def id
  @id
end

#latObject

Returns the value of attribute lat.



4
5
6
# File 'lib/metro_area.rb', line 4

def lat
  @lat
end

#lngObject

Returns the value of attribute lng.



4
5
6
# File 'lib/metro_area.rb', line 4

def lng
  @lng
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/metro_area.rb', line 4

def name
  @name
end

#stateObject

Returns the value of attribute state.



4
5
6
# File 'lib/metro_area.rb', line 4

def state
  @state
end