Class: Icalendar::Geo
Instance Attribute Summary collapse
-
#latitude ⇒ Object
(also: #lat)
Returns the value of attribute latitude.
-
#longitude ⇒ Object
(also: #long)
Returns the value of attribute longitude.
Instance Method Summary collapse
-
#initialize(lat, long) ⇒ Geo
constructor
A new instance of Geo.
- #to_ical ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(lat, long) ⇒ Geo
Returns a new instance of Geo.
21 22 23 24 |
# File 'lib/icalendar/component.rb', line 21 def initialize(lat, long) @latitude = lat @longitude = long end |
Instance Attribute Details
#latitude ⇒ Object Also known as: lat
Returns the value of attribute latitude.
15 16 17 |
# File 'lib/icalendar/component.rb', line 15 def latitude @latitude end |
#longitude ⇒ Object Also known as: long
Returns the value of attribute longitude.
15 16 17 |
# File 'lib/icalendar/component.rb', line 15 def longitude @longitude end |
Instance Method Details
#to_ical ⇒ Object
26 27 28 |
# File 'lib/icalendar/component.rb', line 26 def to_ical "#{@latitude.to_ical};#{@longitude.to_ical}" end |