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.
44 45 46 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 44 def x @x end |
#y ⇒ Integer (readonly)
The Y coordinate.
44 45 46 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 44 def y @y end |
Instance Method Details
#to_a ⇒ Array
Returns the object's property values as an array.
59 60 61 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 59 def to_a [x, y] end |
#to_h ⇒ Hash
Converts object to a hash. All keys will be symbolized.
68 69 70 |
# File 'lib/google/cloud/vision/annotation/vertex.rb', line 68 def to_h { x: x, y: y } end |