class TheFox::TermKit::Size

Attributes

height[RW]
width[RW]

Public Class Methods

new(width = nil, height = nil) click to toggle source
# File lib/termkit/misc/size.rb, line 10
def initialize(width = nil, height = nil)
    @width = width
    @height = height
end

Public Instance Methods

inspect() click to toggle source
# File lib/termkit/misc/size.rb, line 19
def inspect
    w_s = @width.nil? ? 'NIL' : @width.to_s
    h_s = @height.nil? ? 'NIL' : @height.to_s
    
    "#<Size w=#{w_s} h=#{h_s}>"
end
to_s() click to toggle source
# File lib/termkit/misc/size.rb, line 15
def to_s
    "#{@width}:#{@height}"
end