Class: Xrechnung::Quantity
- Inherits:
-
Struct
- Object
- Struct
- Xrechnung::Quantity
- Defined in:
- lib/xrechnung/quantity.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#unit_code ⇒ Object
Returns the value of attribute unit_code.
Instance Method Summary collapse
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount
2 3 4 |
# File 'lib/xrechnung/quantity.rb', line 2 def amount @amount end |
#unit_code ⇒ Object
Returns the value of attribute unit_code
2 3 4 |
# File 'lib/xrechnung/quantity.rb', line 2 def unit_code @unit_code end |
Instance Method Details
#amount_to_s ⇒ Object
3 4 5 |
# File 'lib/xrechnung/quantity.rb', line 3 def amount_to_s format("%0.2f", amount) end |
#xml_args ⇒ Object
7 8 9 |
# File 'lib/xrechnung/quantity.rb', line 7 def xml_args [amount_to_s, { unitCode: unit_code }] end |