Class: PPCurses::Rect
- Inherits:
-
Object
- Object
- PPCurses::Rect
- Defined in:
- lib/ppcurses/geometry.rb
Overview
Instance Attribute Summary collapse
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#size ⇒ Object
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(origin, size) ⇒ Rect
constructor
A new instance of Rect.
- #to_s ⇒ Object
Constructor Details
#initialize(origin, size) ⇒ Rect
Returns a new instance of Rect.
47 48 49 50 |
# File 'lib/ppcurses/geometry.rb', line 47 def initialize ( origin, size ) @origin = origin @size = size end |
Instance Attribute Details
#origin ⇒ Object
Returns the value of attribute origin.
45 46 47 |
# File 'lib/ppcurses/geometry.rb', line 45 def origin @origin end |
#size ⇒ Object
Returns the value of attribute size.
45 46 47 |
# File 'lib/ppcurses/geometry.rb', line 45 def size @size end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
63 64 65 |
# File 'lib/ppcurses/geometry.rb', line 63 def to_s "origin[#{@origin}] size[#{@size}]" end |