Class: Panier::Domain::TaxClass

Inherits:
Object
  • Object
show all
Defined in:
lib/panier/domain/tax_class.rb

Overview

A tax class is a value object that describes a particular type of tax or duty applicable to products sold.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, rate) ⇒ TaxClass

Initializes the tax class using the given name and rate.



15
16
17
18
# File 'lib/panier/domain/tax_class.rb', line 15

def initialize(name, rate)
  @name = name
  self.rate = rate
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/panier/domain/tax_class.rb', line 8

def name
  @name
end

#rateObject

Returns the value of attribute rate.



8
9
10
# File 'lib/panier/domain/tax_class.rb', line 8

def rate
  @rate
end