Class: Point

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

Instance Method Summary collapse

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_sObject



9
10
11
# File 'lib/dxf-dummy-generator/Point.rb', line 9

def to_s
	"("+@x.to_s+","+@y.to_s+")"
end

#xObject



6
# File 'lib/dxf-dummy-generator/Point.rb', line 6

def x; @x; end

#yObject



7
# File 'lib/dxf-dummy-generator/Point.rb', line 7

def y; @y; end