Class: Fiscalizer::Fee
- Inherits:
-
Object
- Object
- Fiscalizer::Fee
- Defined in:
- lib/fiscalizer/data_objects/fee.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name:, value:) ⇒ Fee
constructor
A new instance of Fee.
- #value_str ⇒ Object
Constructor Details
#initialize(name:, value:) ⇒ Fee
Returns a new instance of Fee.
3 4 5 6 |
# File 'lib/fiscalizer/data_objects/fee.rb', line 3 def initialize(name:, value:) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/fiscalizer/data_objects/fee.rb', line 8 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/fiscalizer/data_objects/fee.rb', line 8 def value @value end |
Instance Method Details
#value_str ⇒ Object
14 15 16 |
# File 'lib/fiscalizer/data_objects/fee.rb', line 14 def value_str format('%15.2f', value).strip end |