Skip to content

Instantly share code, notes, and snippets.

@gamesover
gamesover / ruby.rb
Created May 23, 2017 22:32 — forked from ashleyconnor/ruby.rb
Ruby Test Cart
require 'bigdecimal'
class Item
attr_accessor :code, :name, :price
def initialize(code, name, price)
@code = code
@name = name
@price = BigDecimal.new("#{price}")