Class: Robot::Simulator::Coordinate
- Inherits:
-
Object
- Object
- Robot::Simulator::Coordinate
- Defined in:
- lib/robot/simulator/coordinate.rb
Overview
Coordinate on the table, starting from (0, 0) on south west corner.
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Coordinate
constructor
A new instance of Coordinate.
Constructor Details
#initialize(x, y) ⇒ Coordinate
Returns a new instance of Coordinate.
7 8 9 |
# File 'lib/robot/simulator/coordinate.rb', line 7 def initialize(x, y) @x, @y = x, y end |
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x.
5 6 7 |
# File 'lib/robot/simulator/coordinate.rb', line 5 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
5 6 7 |
# File 'lib/robot/simulator/coordinate.rb', line 5 def y @y end |