Class: KudagoClient::Entities::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/kudago_client/entities/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#coordsObject (readonly)

Returns the value of attribute coords.



6
7
8
# File 'lib/kudago_client/entities/location.rb', line 6

def coords
  @coords
end

#currencyObject (readonly)

Returns the value of attribute currency.



6
7
8
# File 'lib/kudago_client/entities/location.rb', line 6

def currency
  @currency
end

#languageObject (readonly)

Returns the value of attribute language.



6
7
8
# File 'lib/kudago_client/entities/location.rb', line 6

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/kudago_client/entities/location.rb', line 6

def name
  @name
end

#slugObject (readonly)

Returns the value of attribute slug.



6
7
8
# File 'lib/kudago_client/entities/location.rb', line 6

def slug
  @slug
end

#timezoneObject (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

#latObject



18
19
20
# File 'lib/kudago_client/entities/location.rb', line 18

def lat
  coords[:lat]
end

#lonObject



22
23
24
# File 'lib/kudago_client/entities/location.rb', line 22

def lon
  coords[:lon]
end