Class: AIPP::Border::Position
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.
129 130 131 |
# File 'lib/aipp/border.rb', line 129 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.
127 128 129 |
# File 'lib/aipp/border.rb', line 127 def coordinates_index @coordinates_index end |
#geometry_index ⇒ Object
Returns the value of attribute geometry_index.
126 127 128 |
# File 'lib/aipp/border.rb', line 126 def geometry_index @geometry_index end |
Instance Method Details
#inspect ⇒ String
134 135 136 |
# File 'lib/aipp/border.rb', line 134 def inspect %Q(#<#{self.class} xy=#{xy}>) end |
#xy ⇒ AIXM::XY?
Coordinates for this position
141 142 143 |
# File 'lib/aipp/border.rb', line 141 def xy @geometries.dig(@geometry_index, @coordinates_index) end |