Class: PPCurses::Size

Inherits:
Object
  • Object
show all
Defined in:
lib/ppcurses/geometry.rb

Overview


Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#heightObject

Returns the value of attribute height.



25
26
27
# File 'lib/ppcurses/geometry.rb', line 25

def height
  @height
end

#widthObject

Returns the value of attribute width.



25
26
27
# File 'lib/ppcurses/geometry.rb', line 25

def width
  @width
end

Class Method Details

.zeroSizeObject



32
33
34
# File 'lib/ppcurses/geometry.rb', line 32

def Size.zeroSize
  Size.new
end

Instance Method Details

#to_sObject



36
37
38
# File 'lib/ppcurses/geometry.rb', line 36

def to_s
  "width=#{@width} height=#{@height}"
end