Module: CalculatePrice

Defined in:
lib/pricecalculater.rb

Class Method Summary collapse

Class Method Details

.product(price, quantity) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/pricecalculater.rb', line 2

def self.product(price,quantity)
	if quantity != 0 && price != 0
	    num = price * quantity
	    return num
	else
		num = 0
		return num
	end
end