Class: Spritpreisrechner::Location

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ Location

Returns a new instance of Location.



5
6
7
8
9
10
11
# File 'lib/spritpreisrechner/location.rb', line 5

def initialize(location)
  @address = location[:address]
  @postal_code = location[:postalCode]
  @city = location[:city]
  @longitude = location[:longitude]
  @latitude = location[:latitude]
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



3
4
5
# File 'lib/spritpreisrechner/location.rb', line 3

def address
  @address
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/spritpreisrechner/location.rb', line 3

def city
  @city
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



3
4
5
# File 'lib/spritpreisrechner/location.rb', line 3

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



3
4
5
# File 'lib/spritpreisrechner/location.rb', line 3

def longitude
  @longitude
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



3
4
5
# File 'lib/spritpreisrechner/location.rb', line 3

def postal_code
  @postal_code
end