Class: Location

Inherits:
Object
  • Object
show all
Defined in:
lib/stanzas/notification_stanza.rb

Instance Method Summary collapse

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

#latObject



95
96
97
# File 'lib/stanzas/notification_stanza.rb', line 95

def lat
  @lat ||= point.split().first.to_f
end

#lonObject



99
100
101
# File 'lib/stanzas/notification_stanza.rb', line 99

def lon
  @lon ||= point.split().last.to_f
end

#pointObject



91
92
93
# File 'lib/stanzas/notification_stanza.rb', line 91

def point
  @point ||= @node.text
end