Class: WithholdingTaxCalculator
- Inherits:
-
Object
- Object
- WithholdingTaxCalculator
- Defined in:
- lib/philippines_withholdingtax.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ WithholdingTaxCalculator
constructor
Calculate your Withholding Tax!.
Constructor Details
#initialize(options) ⇒ WithholdingTaxCalculator
Calculate your Withholding Tax!
Example:
>> WithholdingTaxCalculator.new(payroll_period: "daily", compensation_level: 9000).call
=> 2469.19
Arguments
payroll_period: (string), possible values: ["daily", "monthly", "semimonthly", "monthly"]
compensation_level: (number)
12 13 14 15 |
# File 'lib/philippines_withholdingtax.rb', line 12 def initialize() @payroll_period = [:payroll_period] @compensation_level = [:compensation_level] end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/philippines_withholdingtax.rb', line 17 def call set_period set_bracket set_minimum_tax set_percentage_on_excess calculate_excess calculate_tax_from_excess return_withholding_tax end |