Submission Status: Passed
Submitted for: March 6 - Integrate a Helper Module in Ruby
Submitted at: August 01, 2017
module InvoiceHelper def taxable? source if source == 'online' or source == 'AZ' true else false end end end class Sale include InvoiceHelper def initialize(total, source) @source = source @total = total end def place_order return (@total + (@total * 0.06)) if taxable? @source @total end end
devCamp does not support ancient browsers.
Install a modern version for best experience.