Class: Secretariat::Tax

Inherits:
Struct
  • Object
show all
Defined in:
lib/secretariat/tax.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTax

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_amountObject

Returns the value of attribute base_amount

Returns:

  • (Object)

    the current value of base_amount



20
21
22
# File 'lib/secretariat/tax.rb', line 20

def base_amount
  @base_amount
end

#tax_amountObject

Returns the value of attribute tax_amount

Returns:

  • (Object)

    the current value of tax_amount



20
21
22
# File 'lib/secretariat/tax.rb', line 20

def tax_amount
  @tax_amount
end

#tax_categoryObject

Returns the value of attribute tax_category

Returns:

  • (Object)

    the current value of tax_category



20
21
22
# File 'lib/secretariat/tax.rb', line 20

def tax_category
  @tax_category
end

#tax_percentObject

Returns the value of attribute tax_percent

Returns:

  • (Object)

    the current value of tax_percent



20
21
22
# File 'lib/secretariat/tax.rb', line 20

def tax_percent
  @tax_percent
end

Instance Method Details

#untaxable?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/secretariat/tax.rb', line 34

def untaxable?
  tax_category == :UNTAXEDSERVICE
end