Class: PPCurses::Point
- Inherits:
-
Object
- Object
- PPCurses::Point
- Defined in:
- lib/ppcurses/geometry.rb
Instance Attribute Summary collapse
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(x = 0, y = 0) ⇒ Point
constructor
A new instance of Point.
- #to_s ⇒ Object
Constructor Details
#initialize(x = 0, y = 0) ⇒ Point
7 8 9 10 |
# File 'lib/ppcurses/geometry.rb', line 7 def initialize( x=0, y=0 ) @x = x @y = y end |
Instance Attribute Details
#x ⇒ Object
Returns the value of attribute x.
5 6 7 |
# File 'lib/ppcurses/geometry.rb', line 5 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
5 6 7 |
# File 'lib/ppcurses/geometry.rb', line 5 def y @y end |
Class Method Details
.zeroPoint ⇒ Object
16 17 18 |
# File 'lib/ppcurses/geometry.rb', line 16 def Point.zeroPoint Point.new end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/ppcurses/geometry.rb', line 12 def to_s "x=#{@x} y=#{@y}" end |