Class: GetGeo::Data
- Inherits:
-
Object
- Object
- GetGeo::Data
- Defined in:
- lib/get_geo/data.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#lat ⇒ Object
readonly
Returns the value of attribute lat.
-
#lon ⇒ Object
readonly
Returns the value of attribute lon.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(args) ⇒ Data
constructor
A new instance of Data.
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
#city ⇒ Object (readonly)
Returns the value of attribute city.
2 3 4 |
# File 'lib/get_geo/data.rb', line 2 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
2 3 4 |
# File 'lib/get_geo/data.rb', line 2 def country @country end |
#lat ⇒ Object (readonly)
Returns the value of attribute lat.
2 3 4 |
# File 'lib/get_geo/data.rb', line 2 def lat @lat end |
#lon ⇒ Object (readonly)
Returns the value of attribute lon.
2 3 4 |
# File 'lib/get_geo/data.rb', line 2 def lon @lon end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
2 3 4 |
# File 'lib/get_geo/data.rb', line 2 def query @query end |