Class: Waqi::City

Inherits:
Struct
  • Object
show all
Defined in:
lib/waqi/models/city.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#geoObject

Returns the value of attribute geo

Returns:

  • (Object)

    the current value of geo



2
3
4
# File 'lib/waqi/models/city.rb', line 2

def geo
  @geo
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/waqi/models/city.rb', line 2

def name
  @name
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



2
3
4
# File 'lib/waqi/models/city.rb', line 2

def url
  @url
end

Class Method Details

.parse(hash) ⇒ Object



3
4
5
# File 'lib/waqi/models/city.rb', line 3

def self.parse(hash)
  new(*hash.values_at(*self.members))
end