Class: Location

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

Instance Method Summary (collapse)

Constructor Details

- (Location) initialize(node)



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