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.
89 90 91 |
# File 'lib/stanzas/notification_stanza.rb', line 89 def initialize(node) @node = node end |
Instance Method Details
#lat ⇒ Object
97 98 99 |
# File 'lib/stanzas/notification_stanza.rb', line 97 def lat @lat ||= point.split().first.to_f end |
#lon ⇒ Object
101 102 103 |
# File 'lib/stanzas/notification_stanza.rb', line 101 def lon @lon ||= point.split().last.to_f end |
#point ⇒ Object
93 94 95 |
# File 'lib/stanzas/notification_stanza.rb', line 93 def point @point ||= @node.text end |