Class: Location
- Inherits:
-
Object
- Object
- Location
- Defined in:
- lib/stanzas/notification_stanza.rb
Instance Method Summary collapse
-
#initialize(node) ⇒ Location
constructor
A new instance of Location.
- #lat ⇒ Object
- #lon ⇒ Object
- #point ⇒ Object
Constructor Details
#initialize(node) ⇒ Location
Returns a new instance of Location.
87 88 89 |
# File 'lib/stanzas/notification_stanza.rb', line 87 def initialize(node) @node = node end |
Instance Method Details
#lat ⇒ Object
95 96 97 |
# File 'lib/stanzas/notification_stanza.rb', line 95 def lat @lat ||= point.split().first.to_f end |
#lon ⇒ Object
99 100 101 |
# File 'lib/stanzas/notification_stanza.rb', line 99 def lon @lon ||= point.split().last.to_f end |
#point ⇒ Object
91 92 93 |
# File 'lib/stanzas/notification_stanza.rb', line 91 def point @point ||= @node.text end |