Class: AIPP::Border::Position
- Inherits:
-
Object
- Object
- AIPP::Border::Position
- Defined in:
- lib/aipp/border.rb
Overview
Position defines an exact point on a border
Instance Attribute Summary collapse
-
#coordinates_index ⇒ Object
Returns the value of attribute coordinates_index.
-
#geometry_index ⇒ Object
Returns the value of attribute geometry_index.
Instance Method Summary collapse
-
#initialize(geometries:, geometry_index:, coordinates_index:) ⇒ Position
constructor
A new instance of Position.
- #inspect ⇒ String
-
#xy ⇒ AIXM::XY?
Coordinates for this position.
Constructor Details
#initialize(geometries:, geometry_index:, coordinates_index:) ⇒ Position
Returns a new instance of Position.
160 161 162 |
# File 'lib/aipp/border.rb', line 160 def initialize(geometries:, geometry_index:, coordinates_index:) @geometries, @geometry_index, @coordinates_index = geometries, geometry_index, coordinates_index end |
Instance Attribute Details
#coordinates_index ⇒ Object
Returns the value of attribute coordinates_index.
158 159 160 |
# File 'lib/aipp/border.rb', line 158 def coordinates_index @coordinates_index end |
#geometry_index ⇒ Object
Returns the value of attribute geometry_index.
157 158 159 |
# File 'lib/aipp/border.rb', line 157 def geometry_index @geometry_index end |
Instance Method Details
#inspect ⇒ String
165 166 167 |
# File 'lib/aipp/border.rb', line 165 def inspect %Q(#<#{self.class} xy=#{xy}>) end |
#xy ⇒ AIXM::XY?
Coordinates for this position
172 173 174 |
# File 'lib/aipp/border.rb', line 172 def xy @geometries.dig(@geometry_index, @coordinates_index) end |