Class: Croatia::Invoice::Tax
- Inherits:
-
Object
- Object
- Croatia::Invoice::Tax
- Includes:
- Enum
- Defined in:
- lib/croatia/invoice/tax.rb
Instance Attribute Summary collapse
-
#rate ⇒ Object
Returns the value of attribute rate.
Instance Method Summary collapse
-
#initialize(rate: nil, type: :value_added_tax, category: :standard) ⇒ Tax
constructor
A new instance of Tax.
Methods included from Enum
Constructor Details
#initialize(rate: nil, type: :value_added_tax, category: :standard) ⇒ Tax
Returns a new instance of Tax.
14 15 16 17 18 |
# File 'lib/croatia/invoice/tax.rb', line 14 def initialize(rate: nil, type: :value_added_tax, category: :standard) self.type = type self.category = category self.rate = rate ? rate : Croatia.config.tax_rates[type][category] end |
Instance Attribute Details
#rate ⇒ Object
Returns the value of attribute rate.
9 10 11 |
# File 'lib/croatia/invoice/tax.rb', line 9 def rate @rate end |