Class: Point
- Inherits:
-
Object
- Object
- Point
- Defined in:
- lib/dxf-dummy-generator/Point.rb
Instance Method Summary collapse
-
#initialize(x, y) ⇒ Point
constructor
A new instance of Point.
- #to_s ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
Constructor Details
#initialize(x, y) ⇒ Point
Returns a new instance of Point.
2 3 4 |
# File 'lib/dxf-dummy-generator/Point.rb', line 2 def initialize(x,y) @x, @y = x, y end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/dxf-dummy-generator/Point.rb', line 9 def to_s "("+@x.to_s+","+@y.to_s+")" end |
#x ⇒ Object
6 |
# File 'lib/dxf-dummy-generator/Point.rb', line 6 def x; @x; end |
#y ⇒ Object
7 |
# File 'lib/dxf-dummy-generator/Point.rb', line 7 def y; @y; end |