Class: ProceduralShape::Rectangle

Inherits:
Object
  • Object
show all
Defined in:
lib/shape/procedural_shape/rectangle.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(height, width) ⇒ Rectangle

Returns a new instance of Rectangle.



4
5
6
7
# File 'lib/shape/procedural_shape/rectangle.rb', line 4

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

Instance Attribute Details

#heightObject

Returns the value of attribute height.



3
4
5
# File 'lib/shape/procedural_shape/rectangle.rb', line 3

def height
  @height
end

#widthObject

Returns the value of attribute width.



3
4
5
# File 'lib/shape/procedural_shape/rectangle.rb', line 3

def width
  @width
end