Class: PPCurses::Size
- Inherits:
-
Object
- Object
- PPCurses::Size
- Defined in:
- lib/ppcurses/geometry.rb
Overview
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(width = 0, height = 0) ⇒ Size
constructor
A new instance of Size.
- #to_s ⇒ Object
Constructor Details
#initialize(width = 0, height = 0) ⇒ Size
27 28 29 30 |
# File 'lib/ppcurses/geometry.rb', line 27 def initialize( width=0, height=0 ) @width = width @height = height end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
25 26 27 |
# File 'lib/ppcurses/geometry.rb', line 25 def height @height end |
#width ⇒ Object
Returns the value of attribute width.
25 26 27 |
# File 'lib/ppcurses/geometry.rb', line 25 def width @width end |
Class Method Details
.zeroSize ⇒ Object
32 33 34 |
# File 'lib/ppcurses/geometry.rb', line 32 def Size.zeroSize Size.new end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/ppcurses/geometry.rb', line 36 def to_s "width=#{@width} height=#{@height}" end |