Class: Spritpreisrechner::Location
- Inherits:
-
Object
- Object
- Spritpreisrechner::Location
- Defined in:
- lib/spritpreisrechner/location.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
Instance Method Summary collapse
-
#initialize(location) ⇒ Location
constructor
A new instance of Location.
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
#address ⇒ Object (readonly)
Returns the value of attribute address.
3 4 5 |
# File 'lib/spritpreisrechner/location.rb', line 3 def address @address end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
3 4 5 |
# File 'lib/spritpreisrechner/location.rb', line 3 def city @city end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
3 4 5 |
# File 'lib/spritpreisrechner/location.rb', line 3 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/spritpreisrechner/location.rb', line 3 def longitude @longitude end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
3 4 5 |
# File 'lib/spritpreisrechner/location.rb', line 3 def postal_code @postal_code end |