Class: Rect
- Inherits:
-
Object
- Object
- Rect
- Defined in:
- lib/rect.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
- #empty ⇒ Object
-
#initialize(x = 0, y = 0, width = 0, height = 0) ⇒ Rect
constructor
A new instance of Rect.
- #set(arg1, y = nil, width = nil, height = nil) ⇒ Object
Constructor Details
#initialize(x = 0, y = 0, width = 0, height = 0) ⇒ Rect
Returns a new instance of Rect.
3 4 5 |
# File 'lib/rect.rb', line 3 def initialize(x = 0, y = 0, width = 0, height = 0) fail NotImplementedError end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
21 22 23 |
# File 'lib/rect.rb', line 21 def height @height end |
#width ⇒ Object
Returns the value of attribute width.
19 20 21 |
# File 'lib/rect.rb', line 19 def width @width end |
#x ⇒ Object
Returns the value of attribute x.
15 16 17 |
# File 'lib/rect.rb', line 15 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
17 18 19 |
# File 'lib/rect.rb', line 17 def y @y end |
Instance Method Details
#empty ⇒ Object
11 12 13 |
# File 'lib/rect.rb', line 11 def empty fail NotImplementedError end |
#set(arg1, y = nil, width = nil, height = nil) ⇒ Object
7 8 9 |
# File 'lib/rect.rb', line 7 def set(arg1, y = nil, width = nil, height = nil) fail NotImplementedError end |