Class: PREP::Core::Point

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

Overview

nodoc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Point

Returns a new instance of Point.



11
12
13
# File 'lib/core/point.rb', line 11

def initialize(x, y)
  self.x, self.y = x, y
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



9
10
11
# File 'lib/core/point.rb', line 9

def x
  @x
end

#yObject

Returns the value of attribute y.



9
10
11
# File 'lib/core/point.rb', line 9

def y
  @y
end