Class: Potty::Layout::Rect

Inherits:
Struct
  • Object
show all
Defined in:
lib/potty/layout.rb

Overview

Rectangle representing position and size

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



7
8
9
# File 'lib/potty/layout.rb', line 7

def height
  @height
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



7
8
9
# File 'lib/potty/layout.rb', line 7

def width
  @width
end

#xObject

Returns the value of attribute x

Returns:

  • (Object)

    the current value of x



7
8
9
# File 'lib/potty/layout.rb', line 7

def x
  @x
end

#yObject

Returns the value of attribute y

Returns:

  • (Object)

    the current value of y



7
8
9
# File 'lib/potty/layout.rb', line 7

def y
  @y
end

Instance Method Details

#to_sObject



8
9
10
# File 'lib/potty/layout.rb', line 8

def to_s
  "Rect(x=#{x}, y=#{y}, w=#{width}, h=#{height})"
end