Skip to content

Instantly share code, notes, and snippets.

@leimd
Created June 23, 2015 23:14
Show Gist options
  • Save leimd/b7dbc5644825d2883d3f to your computer and use it in GitHub Desktop.
Save leimd/b7dbc5644825d2883d3f to your computer and use it in GitHub Desktop.
SignShop
def quotes(area,no_color)
no_color <= 2 ? color_price = no_color * 10 : color_price = 15 * no_color
return (area * 15 + color_price) * 1.15
end
puts "10 sqft and 2 color should be 195.5 Actual return #{quotes(10,2)}"
puts "10 sqft and 3 color should be 224.25 Actual return #{quotes(10,3)}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment