Class: Lebowski::Rect
- Inherits:
-
Object
- Object
- Lebowski::Rect
- Defined in:
- lib/lebowski/core.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#width ⇒ Object
Returns the value of attribute width.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(width, height, x, y) ⇒ Rect
constructor
A new instance of Rect.
- #to_s ⇒ Object
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
#height ⇒ Object
Returns the value of attribute height.
5 6 7 |
# File 'lib/lebowski/core.rb', line 5 def height @height end |
#width ⇒ Object
Returns the value of attribute width.
5 6 7 |
# File 'lib/lebowski/core.rb', line 5 def width @width end |
#x ⇒ Object
Returns the value of attribute x.
5 6 7 |
# File 'lib/lebowski/core.rb', line 5 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
5 6 7 |
# File 'lib/lebowski/core.rb', line 5 def y @y end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/lebowski/core.rb', line 14 def to_s() return "Rect<width: #{width}, height: #{height}, x: #{x}, y: #{y}>" end |