Class: Graphdown::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/graphdown/point.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x = 0, y = 0) ⇒ Point

Returns a new instance of Point.



5
6
7
8
# File 'lib/graphdown/point.rb', line 5

def initialize(x = 0, y = 0)
  @x = x
  @y = y
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



3
4
5
# File 'lib/graphdown/point.rb', line 3

def x
  @x
end

#yObject

Returns the value of attribute y.



3
4
5
# File 'lib/graphdown/point.rb', line 3

def y
  @y
end