I am starting my studies with Ruby and OO and I have received a test to do about OO. I am looking for new ways to improve the scenario following object-oriented concepts. Is there a better way to develop this design applying polymorphism? Here is my problem:If the product is physical, I have to generate a shipping label.If it's a book, I have to mention that this product doesn't have taxes.If the product is a membership, I have to activate the signature and notify the buyer via email.If the product is digital, I have to send an email for the buyer and give a $10 discount for this product.class Product  attr_reader :name, :description, :type, :amount  include Shipping  include Discount    def initialize(name, description, type, amount)        @name = name        @description = description        @type = type        @amount = amount    end endclass Physical < Product    def initialize(name, description, type, amount)        super(name, description, type, amount)    end    def shipping        case @type            when :book                create_shipping_label                notify_buyer_product_without_taxes            else                create_shipping_label            end    end    def discount        discount_for_physical_product = 0.0      return discount_for_physical_product    endendclass Membership < Product    attr_reader :membership_status    def initialize(name, description, type, amount)        super(name, description, type, amount)    end  def activate_membership()    @membership_status = true;  end  def shipping    notify_buyer_via_email    activate_membership  end  def discount    discount_for_membership_product = 0    return discount_for_membership_product  endendclass Digital < Product    def initialize(name, description, type, amount)        super(name, description, type, amount)    end  def shipping    notify_buyer_via_email  end     def discount    discount_for_digital_product = 10.00    return discount_for_digital_product  endendmodule Discount    def prepare_discount(order)        total_discount = 0        order.get_items.each do |item|             total_discount += item.product.discount        end        return total_discount    end    def discount        discount_default = 0.0        return discount_default    endend
Initiating an action based on product type
object oriented;ruby