title: Ruby - Wrong number of argument (1/2)
body: <p>The question is that when I tried with a Product it works, but with a Fruit doesn´t and came this error:</p>
  
  <pre><code>shoppingCart.rb:7:in `initialize': wrong number of arguments (1 for 2) (Argument
  Error)
          from shoppingCart.rb:21:in `initialize'
          from shoppingCart.rb:37:in `new'
          from shoppingCart.rb:37:in `&lt;main&gt;'
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>class Product
    attr_accessor :name
    attr_accessor :price
    attr_accessor :discount
  
  
    def initialize(name, price)
      @name = name
      @price = price
    end
  
    def calculatePrice
      puts "The price of the #{@name} is #{@price} euros"
    end
  
  end
  
  class Fruit &lt; Product
  
    def initialize(name, price)
      super(name)
      super(price)
    end
  
    def discount()
      @discount = 10
    end
  end
  
  banana = Fruit.new("banana", 10)
  banana.calculatePrice
  </code></pre>