Class: Google::Cloud::Vision::Location
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Location
- Defined in:
- lib/google/cloud/vision/location.rb
Overview
Location
A latitude/longitude pair with values conforming to the WGS84 standard.
Instance Attribute Summary collapse
-
#latitude ⇒ Float
The degrees latitude conforming to the WGS84 standard.
-
#longitude ⇒ Float
The degrees longitude conforming to the WGS84 standard.
Instance Method Summary collapse
-
#to_a ⇒ Array
Returns the object's property values as an array.
-
#to_h ⇒ Hash
Converts object to a hash.
Instance Attribute Details
#latitude ⇒ Float
The degrees latitude conforming to the WGS84 standard.
44 45 46 |
# File 'lib/google/cloud/vision/location.rb', line 44 def latitude @latitude end |
#longitude ⇒ Float
The degrees longitude conforming to the WGS84 standard.
44 45 46 |
# File 'lib/google/cloud/vision/location.rb', line 44 def longitude @longitude end |
Instance Method Details
#to_a ⇒ Array
Returns the object's property values as an array.
59 60 61 |
# File 'lib/google/cloud/vision/location.rb', line 59 def to_a [latitude, longitude] end |
#to_h ⇒ Hash
Converts object to a hash. All keys will be symbolized.
68 69 70 |
# File 'lib/google/cloud/vision/location.rb', line 68 def to_h { latitude: latitude, longitude: longitude } end |