Method: Vedeu::Geometries::Position#initialize
- Defined in:
- lib/vedeu/geometries/position.rb
#initialize(y = 1, x = 1) ⇒ Vedeu::Geometries::Position
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initializes a new instance of Vedeu::Geometries::Position.
45 46 47 48 49 50 |
# File 'lib/vedeu/geometries/position.rb', line 45 def initialize(y = 1, x = 1) @y = Vedeu::Point.coerce(value: y, max: Vedeu.height).value @x = Vedeu::Point.coerce(value: x, max: Vedeu.width).value freeze end |