Class: Rect

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#heightObject

Returns the value of attribute height.



21
22
23
# File 'lib/rect.rb', line 21

def height
  @height
end

#widthObject

Returns the value of attribute width.



19
20
21
# File 'lib/rect.rb', line 19

def width
  @width
end

#xObject

Returns the value of attribute x.



15
16
17
# File 'lib/rect.rb', line 15

def x
  @x
end

#yObject

Returns the value of attribute y.



17
18
19
# File 'lib/rect.rb', line 17

def y
  @y
end

Instance Method Details

#emptyObject



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