Class: Twitter::Geo::Point
- Inherits:
-
Twitter::Geo
- Object
- Base
- Twitter::Geo
- Twitter::Geo::Point
- Defined in:
- lib/twitter/geo/point.rb
Overview
Represents a geographic point with latitude and longitude
Instance Attribute Summary
Attributes inherited from Twitter::Geo
Attributes inherited from Base
Instance Method Summary collapse
-
#latitude ⇒ Float
(also: #lat)
Returns the latitude of this point.
-
#longitude ⇒ Float
(also: #long, #lng)
Returns the longitude of this point.
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader
Methods included from Utils
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Method Details
#latitude ⇒ Float Also known as: lat
Returns the latitude of this point
13 14 15 |
# File 'lib/twitter/geo/point.rb', line 13 def latitude coordinates[0] end |
#longitude ⇒ Float Also known as: long, lng
Returns the longitude of this point
31 32 33 |
# File 'lib/twitter/geo/point.rb', line 31 def longitude coordinates[1] end |