Class: GetGeo::Data

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Data

Returns a new instance of Data.



4
5
6
7
8
9
10
# File 'lib/get_geo/data.rb', line 4

def initialize(args)
  @city = args[:city]
  @country = args[:country]
  @lat = args[:lat]
  @lon = args[:lon]
  @query = args[:query]
end

Instance Attribute Details

#cityObject (readonly)

Returns the value of attribute city.



2
3
4
# File 'lib/get_geo/data.rb', line 2

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



2
3
4
# File 'lib/get_geo/data.rb', line 2

def country
  @country
end

#latObject (readonly)

Returns the value of attribute lat.



2
3
4
# File 'lib/get_geo/data.rb', line 2

def lat
  @lat
end

#lonObject (readonly)

Returns the value of attribute lon.



2
3
4
# File 'lib/get_geo/data.rb', line 2

def lon
  @lon
end

#queryObject (readonly)

Returns the value of attribute query.



2
3
4
# File 'lib/get_geo/data.rb', line 2

def query
  @query
end