Class: Location
- Inherits:
-
Object
- Object
- Location
- Defined in:
- lib/stanzas/notification_stanza.rb
Instance Method Summary (collapse)
-
- (Location) initialize(node)
constructor
A new instance of Location.
- - (Object) lat
- - (Object) lon
- - (Object) point
Constructor Details
- (Location) initialize(node)
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
- (Object) lat
97 98 99 |
# File 'lib/stanzas/notification_stanza.rb', line 97 def lat @lat ||= point.split().first.to_f end |
- (Object) lon
101 102 103 |
# File 'lib/stanzas/notification_stanza.rb', line 101 def lon @lon ||= point.split().last.to_f end |
- (Object) point
93 94 95 |
# File 'lib/stanzas/notification_stanza.rb', line 93 def point @point ||= @node.text end |