Sha256: 2fd2cdfd426816ae8e18c5b637b61f6479ecf584480f3e0a0909b6b3c5db46cd

Contents?: true

Size: 291 Bytes

Versions: 6

Compression:

Stored size: 291 Bytes

Contents

class Taxedo::Builder::Hash < Taxedo::Builder::Base
  def generate
    { subtotal: subtotal, taxes: generate_taxes, total: total }
  end

  def generate_taxes
    taxes.map{ |t| generate_tax t }
  end

  def generate_tax(tax)
    { id: tax.id, name: tax.name, amount: tax.amount }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
taxedo-0.0.6 lib/taxedo/builder/hash.rb
taxedo-0.0.5 lib/taxedo/builder/hash.rb
taxedo-0.0.4 lib/taxedo/builder/hash.rb
taxedo-0.0.3 lib/taxedo/builder/hash.rb
taxedo-0.0.2 lib/taxedo/builder/hash.rb
taxedo-0.0.1 lib/taxedo/builder/hash.rb