Class: Line
- Inherits:
-
Object
- Object
- Line
- Defined in:
- lib/dxf-dummy-generator/Line.rb
Instance Method Summary collapse
- #getDXF ⇒ Object
-
#initialize(startPoint, endPioint) ⇒ Line
constructor
A new instance of Line.
- #to_s ⇒ Object
Constructor Details
#initialize(startPoint, endPioint) ⇒ Line
Returns a new instance of Line.
5 6 7 |
# File 'lib/dxf-dummy-generator/Line.rb', line 5 def initialize(startPoint, endPioint) @startPoint, @endPioint = startPoint, endPioint end |
Instance Method Details
#getDXF ⇒ Object
9 10 11 |
# File 'lib/dxf-dummy-generator/Line.rb', line 9 def getDXF [ "0", "LINE", "8", "0", "10", @startPoint.x, "20", @startPoint.y , "11", @endPioint.x, "21", @endPioint.y] end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/dxf-dummy-generator/Line.rb', line 13 def to_s "[" + startPoint.to_s + endPioint.tos + "]" end |