Class: PREP::Core::Point
- Inherits:
-
Object
- Object
- PREP::Core::Point
- Defined in:
- lib/core/point.rb
Overview
nodoc
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Point
constructor
A new instance of Point.
Constructor Details
#initialize(x, y) ⇒ Point
Returns a new instance of Point.
11 12 13 |
# File 'lib/core/point.rb', line 11 def initialize(x, y) self.x, self.y = x, y end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
9 10 11 |
# File 'lib/core/point.rb', line 9 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
9 10 11 |
# File 'lib/core/point.rb', line 9 def y @y end |