diff --git a/class_super.rb b/class_super.rb index f47ae81..b23932a 100644 --- a/class_super.rb +++ b/class_super.rb @@ -2,20 +2,20 @@ # class_super.rb class Rectangle - + def set_dimension length, breadth @length, @breadth = length, breadth end - + def area @length * @breadth end - + end class Square < Rectangle - + def set_dimension side_length super side_length, side_length end @@ -23,5 +23,5 @@ def set_dimension side_length end square = Square.new -square.set_dim 7 +square.set_dimension 7 puts "Area: #{square.area}"