Class: Google::Cloud::Vision::Annotation::Vertex
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Annotation::Vertex
- Defined in:
- lib/google/cloud/vision/annotation/vertex.rb
Overview
Instance Attribute Summary collapse
-
#x ⇒ Integer
readonly
The X coordinate.
-
#y ⇒ Integer
readonly
The Y coordinate.
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
#x ⇒ Integer (readonly)
The X coordinate.
43 44 45 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 43 def x @x end |
#y ⇒ Integer (readonly)
The Y coordinate.
43 44 45 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 43 def y @y end |
Instance Method Details
#to_a ⇒ Array
Returns the object's property values as an array.
58 59 60 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 58 def to_a [x, y] end |
#to_h ⇒ Hash
Converts object to a hash. All keys will be symbolized.
67 68 69 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 67 def to_h { x: x, y: y } end |