Skip to content

Instantly share code, notes, and snippets.

@szankowski
Created June 24, 2015 02:14
Show Gist options
  • Save szankowski/c0b6e3dcd1e1f938e50e to your computer and use it in GitHub Desktop.
Save szankowski/c0b6e3dcd1e1f938e50e to your computer and use it in GitHub Desktop.

Revisions

  1. szankowski created this gist Jun 24, 2015.
    15 changes: 15 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    def quote_maker(dimension,colours)
    price = dimension * dimension * 15.to_f
    if colours <= 2
    colour_cost = 10 * colours
    price = price + colour_cost
    elsif colours > 2
    colour_cost = 15 * colours
    price = price + colour_cost
    end

    tax = 15/price.to_f * 100
    total = price + tax
    end

    puts quote_maker(2,3)