Class: Invoice
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Invoice
- Defined in:
- app/models/invoice.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#price ⇒ Object
Returns the value of attribute price.
-
#subscription ⇒ Object
Returns the value of attribute subscription.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
8 9 10 |
# File 'app/models/invoice.rb', line 8 def from @from end |
#price ⇒ Object
Returns the value of attribute price.
8 9 10 |
# File 'app/models/invoice.rb', line 8 def price @price end |
#subscription ⇒ Object
Returns the value of attribute subscription.
8 9 10 |
# File 'app/models/invoice.rb', line 8 def subscription @subscription end |
#to ⇒ Object
Returns the value of attribute to.
8 9 10 |
# File 'app/models/invoice.rb', line 8 def to @to end |
Instance Method Details
#amount ⇒ Object
11 12 13 14 |
# File 'app/models/invoice.rb', line 11 def amount invoice_line_items.sum(:price) end |