Class: InssCalculator::Legacy::SeventhDiscountCalculator
- Inherits:
-
DiscountCalculatorBase
- Object
- DiscountCalculatorBase
- InssCalculator::Legacy::SeventhDiscountCalculator
- Defined in:
- lib/inss_calculator/legacy/seventh_discount_calculator.rb
Overview
SeventhDiscountCalculator calculates between its range limit In case the salary is beyond this limit, it will use its quotation apply inside the range salary limit
Constant Summary collapse
- QUOTATION =
0.19
Constants inherited from DiscountCalculatorBase
DiscountCalculatorBase::NO_CONTRIBUTION, DiscountCalculatorBase::SALARY_BASE
Instance Attribute Summary
Attributes inherited from DiscountCalculatorBase
Instance Method Summary collapse
Methods inherited from DiscountCalculatorBase
Constructor Details
This class inherits a constructor from InssCalculator::DiscountCalculatorBase
Instance Method Details
#contribution ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/inss_calculator/legacy/seventh_discount_calculator.rb', line 10 def contribution return NO_CONTRIBUTION if salary <= salary_base return full_contribution if salary > salary_limit calculate_contribution end |