Class: Location

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

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Location



89
90
91
# File 'lib/stanzas/notification_stanza.rb', line 89

def initialize(node)
  @node = node
end

Instance Method Details

#latObject



97
98
99
# File 'lib/stanzas/notification_stanza.rb', line 97

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

#lonObject



101
102
103
# File 'lib/stanzas/notification_stanza.rb', line 101

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

#pointObject



93
94
95
# File 'lib/stanzas/notification_stanza.rb', line 93

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