Sha256: 7f3998c8d99980f608afb585b04212a3bc8ac1b0b132d02c73cbd0e5fdda55e7
Contents?: true
Size: 482 Bytes
Versions: 2
Compression:
Stored size: 482 Bytes
Contents
# frozen_string_literal: true module TaxCalculator module FICA # 2021 SOCIAL_SECURITY_RATE = 6.2 SOCIAL_SECURITY_CUTOFF = 285_600.00 MEDICARE_RATE = 1.45 def self.taxes_for(income) if income >= SOCIAL_SECURITY_CUTOFF owed = ((SOCIAL_SECURITY_CUTOFF * SOCIAL_SECURITY_RATE / 100) + (income * MEDICARE_RATE / 100)) elsif owed = ((income * SOCIAL_SECURITY_RATE / 100) + (income * MEDICARE_RATE / 100)) end owed end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tax_calculator-0.4.0 | lib/tax_calculator/fica.rb |
tax_calculator-0.3.0 | lib/tax_calculator/fica.rb |