class TaxCalculator::Deductions
Constants
- STANDARD_DEDUCTION
Attributes
columbus[R]
federal[R]
fica[R]
ohio[R]
Public Class Methods
new(income, four_01_k, ira, hsa, health_premiums)
click to toggle source
# File lib/tax_calculator/deductions.rb, line 9 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
Public Instance Methods
for_columbus(income, hsa, health_premiums)
click to toggle source
# File lib/tax_calculator/deductions.rb, line 30 def for_columbus(income, hsa, health_premiums) income - (hsa + health_premiums) end
for_federal(income, four_01_k, ira, hsa, health_premiums)
click to toggle source
# File lib/tax_calculator/deductions.rb, line 16 def for_federal(income, four_01_k, ira, hsa, health_premiums) (income - (four_01_k + ira + hsa + health_premiums + STANDARD_DEDUCTION)) end
for_fica(income, hsa, health_premiums)
click to toggle source
# File lib/tax_calculator/deductions.rb, line 20 def for_fica(income, hsa, health_premiums) (income - (hsa + health_premiums)) end
for_ohio(income, four_01_k, ira, hsa, health_premiums)
click to toggle source
# File lib/tax_calculator/deductions.rb, line 24 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