Sha256: 0ba456915822c94c31f9ad4437dda261aaaa1197b20c53f535eb56b232868c5b
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
# frozen_string_literal: true module TaxCalculator class Deductions STANDARD_DEDUCTION = 25_900 attr_reader :federal, :fica, :ohio, :columbus def initialize(income, four_01_k, ira, hsa, health_premiums) @federal = for_federal(income, four_01_k, ira, hsa, health_premiums) @fica = for_fica(income, hsa, health_premiums) @ohio = for_ohio(income, four_01_k, ira, hsa, health_premiums) @columbus = for_columbus(income, hsa, health_premiums) end def for_federal(income, four_01_k, ira, hsa, health_premiums) (income - (four_01_k + ira + hsa + health_premiums + STANDARD_DEDUCTION)) end def for_fica(income, hsa, health_premiums) (income - (hsa + health_premiums)) end def for_ohio(income, four_01_k, ira, hsa, health_premiums) num_exemptions = 2 personal_exemption = 1_900 * num_exemptions (income - (four_01_k + ira + hsa + health_premiums + personal_exemption)) end def for_columbus(income, hsa, health_premiums) income - (hsa + health_premiums) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tax_calculator-0.4.0 | lib/tax_calculator/deductions.rb |