Class: KudagoClient::Entities::Location
- Inherits:
-
Object
- Object
- KudagoClient::Entities::Location
- Defined in:
- lib/kudago_client/entities/location.rb
Instance Attribute Summary collapse
-
#coords ⇒ Object
readonly
Returns the value of attribute coords.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Instance Method Summary collapse
-
#initialize(lang:, slug: nil, name: nil, timezone: nil, coords: nil, language: nil, currency: nil) ⇒ Location
constructor
A new instance of Location.
- #lat ⇒ Object
- #lon ⇒ Object
Constructor Details
#initialize(lang:, slug: nil, name: nil, timezone: nil, coords: nil, language: nil, currency: nil) ⇒ Location
Returns a new instance of Location.
8 9 10 11 12 13 14 15 16 |
# File 'lib/kudago_client/entities/location.rb', line 8 def initialize(lang:, slug: nil, name: nil, timezone: nil, coords: nil, language: nil, currency: nil) @lang = lang @slug = slug @name = name @timezone = timezone @coords = coords @language = language @currency = currency end |
Instance Attribute Details
#coords ⇒ Object (readonly)
Returns the value of attribute coords.
6 7 8 |
# File 'lib/kudago_client/entities/location.rb', line 6 def coords @coords end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
6 7 8 |
# File 'lib/kudago_client/entities/location.rb', line 6 def currency @currency end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
6 7 8 |
# File 'lib/kudago_client/entities/location.rb', line 6 def language @language end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/kudago_client/entities/location.rb', line 6 def name @name end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
6 7 8 |
# File 'lib/kudago_client/entities/location.rb', line 6 def slug @slug end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
6 7 8 |
# File 'lib/kudago_client/entities/location.rb', line 6 def timezone @timezone end |
Instance Method Details
#lat ⇒ Object
18 19 20 |
# File 'lib/kudago_client/entities/location.rb', line 18 def lat coords[:lat] end |
#lon ⇒ Object
22 23 24 |
# File 'lib/kudago_client/entities/location.rb', line 22 def lon coords[:lon] end |