Class: Line

Inherits:
Object
  • Object
show all
Defined in:
lib/dxf-dummy-generator/Line.rb

Instance Method Summary collapse

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

#getDXFObject



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_sObject



13
14
15
# File 'lib/dxf-dummy-generator/Line.rb', line 13

def to_s
	"[" + startPoint.to_s + endPioint.tos + "]"
end