Class: Secretariat::Tax
- Inherits:
-
Struct
- Object
- Struct
- Secretariat::Tax
- Defined in:
- lib/secretariat/tax.rb
Instance Attribute Summary collapse
-
#base_amount ⇒ Object
Returns the value of attribute base_amount.
-
#tax_amount ⇒ Object
Returns the value of attribute tax_amount.
-
#tax_category ⇒ Object
Returns the value of attribute tax_category.
-
#tax_percent ⇒ Object
Returns the value of attribute tax_percent.
Instance Method Summary collapse
-
#initialize ⇒ Tax
constructor
A new instance of Tax.
- #untaxable? ⇒ Boolean
Constructor Details
#initialize ⇒ Tax
Returns a new instance of Tax.
28 29 30 31 32 |
# File 'lib/secretariat/tax.rb', line 28 def initialize(*) super self.tax_amount = 0 self.base_amount = 0 end |
Instance Attribute Details
#base_amount ⇒ Object
Returns the value of attribute base_amount
20 21 22 |
# File 'lib/secretariat/tax.rb', line 20 def base_amount @base_amount end |
#tax_amount ⇒ Object
Returns the value of attribute tax_amount
20 21 22 |
# File 'lib/secretariat/tax.rb', line 20 def tax_amount @tax_amount end |
#tax_category ⇒ Object
Returns the value of attribute tax_category
20 21 22 |
# File 'lib/secretariat/tax.rb', line 20 def tax_category @tax_category end |
#tax_percent ⇒ Object
Returns the value of attribute tax_percent
20 21 22 |
# File 'lib/secretariat/tax.rb', line 20 def tax_percent @tax_percent end |
Instance Method Details
#untaxable? ⇒ Boolean
34 35 36 |
# File 'lib/secretariat/tax.rb', line 34 def untaxable? tax_category == :UNTAXEDSERVICE end |