Sha256: 27eb739baedc14069c07612324a0d53e1a8bfa915a733a59371ca0f2557fffbf
Contents?: true
Size: 573 Bytes
Versions: 1
Compression:
Stored size: 573 Bytes
Contents
class Spotlight class Location < Data def name begin return @data['Hostip']['gml:name'] rescue return nil end end def coordinates begin return @data['Hostip']['ipLocation']['gml:PointProperty']['gml:Point']['gml:coordinates'] rescue return nil end end def longitude return unless self.coordinates self.coordinates.split(',')[0].to_f end def latitude return unless self.coordinates self.coordinates.split(',')[1].to_f end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
attack-spotlight-0.1.0 | lib/spotlight/location.rb |