Sha256: 4630d9d900c8a36f2f894fc6f91070f34ae762896200f310bf300faef7116224
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_100 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 = 2_350 * 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.3.0 | lib/tax_calculator/deductions.rb |