Class: IncomeTax::Models::FixedRate
- Defined in:
- lib/income_tax/models/fixed_rate.rb
Direct Known Subclasses
Countries::Andorra, Countries::Belarus, Countries::Bolivia, Countries::BosniaAndHerzegovina, Countries::Bulgaria, Countries::Congo, Countries::CzechRepublic, Countries::ElSalvador, Countries::Eritrea, Countries::Estonia, Countries::FaroeIslands, Countries::Georgia, Countries::Greenland, Countries::Guernsey, Countries::GuineaBissau, Countries::Haiti, Countries::Honduras, Countries::Hungary, Countries::Iraq, Countries::Jersey, Countries::Kazakhstan, Countries::Kiribati, Countries::Kyrgyzstan, Countries::Latvia, Countries::Liechtenstein, Countries::Lithuania, Countries::Macedonia, Countries::Mali, Countries::Mauritius, Countries::Micronesia, Countries::Mongolia, Countries::Paraguay, Countries::PuertoRico, Countries::Romania, Countries::Russia, Countries::SaintHelena, Countries::SaoTomeAndPrincipe, Countries::Seychelles, Countries::SriLanka, Countries::Sudan, Countries::SvalbardAndJanMayen, Countries::Swaziland, Countries::Togo, Countries::Turkmenistan, Countries::Tuvalu, Countries::Ukraine, Countries::VirginIslandsBritish, NoTaxes
Instance Attribute Summary
Attributes inherited from Generic
#gross_income, #net_income, #options, #rate, #taxes
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Generic
#based_on?, #cast_value, #cast_values, currency, #initialize, #inspect, lazy, #location_name, method_added, name, names, new, other_names, register, register_on, #set_default_options, #setup, #validate, wants_options
Constructor Details
This class inherits a constructor from IncomeTax::Models::Generic
Class Method Details
.rate(value = nil) ⇒ Object
4 5 6 7 |
# File 'lib/income_tax/models/fixed_rate.rb', line 4 def self.rate(value = nil) @rate = Rate.new(value) if value @rate ||= superclass.rate end |
Instance Method Details
#calculate ⇒ Object
9 10 11 |
# File 'lib/income_tax/models/fixed_rate.rb', line 9 def calculate @rate = self.class.rate end |