Class: Lebowski::Rect

Inherits:
Object
  • Object
show all
Defined in:
lib/lebowski/core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(width, height, x, y) ⇒ Rect

Returns a new instance of Rect.



7
8
9
10
11
12
# File 'lib/lebowski/core.rb', line 7

def initialize(width, height, x, y)
  @width = width
  @height = height
  @x = x
  @y = y
end

Instance Attribute Details

#heightObject

Returns the value of attribute height.



5
6
7
# File 'lib/lebowski/core.rb', line 5

def height
  @height
end

#widthObject

Returns the value of attribute width.



5
6
7
# File 'lib/lebowski/core.rb', line 5

def width
  @width
end

#xObject

Returns the value of attribute x.



5
6
7
# File 'lib/lebowski/core.rb', line 5

def x
  @x
end

#yObject

Returns the value of attribute y.



5
6
7
# File 'lib/lebowski/core.rb', line 5

def y
  @y
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/lebowski/core.rb', line 14

def to_s()
  return "Rect<width: #{width}, height: #{height},  x: #{x}, y: #{y}>"
end