Class: SimpleInvoice::LineItem
- Inherits:
-
Struct
- Object
- Struct
- SimpleInvoice::LineItem
- Defined in:
- lib/simple_invoice/line_item.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#price ⇒ Object
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
2 3 4 |
# File 'lib/simple_invoice/line_item.rb', line 2 def description @description end |
#price ⇒ Object
Returns the value of attribute price
2 3 4 |
# File 'lib/simple_invoice/line_item.rb', line 2 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity
2 3 4 |
# File 'lib/simple_invoice/line_item.rb', line 2 def quantity @quantity end |
Instance Method Details
#total ⇒ Fixnum
5 6 7 |
# File 'lib/simple_invoice/line_item.rb', line 5 def total price * quantity end |