Class: Rlocu::Venue::Location
- Inherits:
-
Object
- Object
- Rlocu::Venue::Location
- Defined in:
- lib/rlocu/venue.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
readonly
Returns the value of attribute address1.
-
#address2 ⇒ Object
readonly
Returns the value of attribute address2.
-
#address3 ⇒ Object
readonly
Returns the value of attribute address3.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#geo ⇒ Object
readonly
Returns the value of attribute geo.
-
#locality ⇒ Object
readonly
Returns the value of attribute locality.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Instance Method Summary collapse
-
#initialize(location) ⇒ Location
constructor
A new instance of Location.
- #latitude ⇒ Object
- #longitude ⇒ Object
Constructor Details
#initialize(location) ⇒ Location
Returns a new instance of Location.
95 96 97 98 99 100 101 102 103 104 |
# File 'lib/rlocu/venue.rb', line 95 def initialize(location) @address1 = location['address1'] @address2 = location['address2'] @address3 = location['address3'] @locality = location['locality'] @region = location['region'] @postal_code = location['postal_code'] @country = location['country'] @geo = GeoJSON.new(location['geo']) end |
Instance Attribute Details
#address1 ⇒ Object (readonly)
Returns the value of attribute address1.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def address1 @address1 end |
#address2 ⇒ Object (readonly)
Returns the value of attribute address2.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def address2 @address2 end |
#address3 ⇒ Object (readonly)
Returns the value of attribute address3.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def address3 @address3 end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def country @country end |
#geo ⇒ Object (readonly)
Returns the value of attribute geo.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def geo @geo end |
#locality ⇒ Object (readonly)
Returns the value of attribute locality.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def locality @locality end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def postal_code @postal_code end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
94 95 96 |
# File 'lib/rlocu/venue.rb', line 94 def region @region end |
Instance Method Details
#latitude ⇒ Object
106 107 108 |
# File 'lib/rlocu/venue.rb', line 106 def latitude geo.latitude end |
#longitude ⇒ Object
110 111 112 |
# File 'lib/rlocu/venue.rb', line 110 def longitude geo.longitude end |