Class: Twitter::Point

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter/point.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, lazy_attr_reader

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

  • other (Twiter::Point)

Returns:

  • (Boolean)


9
10
11
# File 'lib/twitter/point.rb', line 9

def ==(other)
  super || (other.class == self.class && other.coordinates == self.coordinates)
end

#latitudeInteger Also known as: lat

Returns:

  • (Integer)


14
15
16
# File 'lib/twitter/point.rb', line 14

def latitude
  coordinates[0]
end

#longitudeInteger Also known as: long, lng

Returns:

  • (Integer)


20
21
22
# File 'lib/twitter/point.rb', line 20

def longitude
  coordinates[1]
end