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