Class: YDIM::Html::State::Invoice::SortableInvoice
- Inherits:
-
Object
- Object
- YDIM::Html::State::Invoice::SortableInvoice
show all
- Defined in:
- lib/ydim/html/state/invoice.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of SortableInvoice.
57
58
59
|
# File 'lib/ydim/html/state/invoice.rb', line 57
def initialize invoice
@invoice = invoice
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
75
76
77
|
# File 'lib/ydim/html/state/invoice.rb', line 75
def method_missing name, *args, &block
@invoice.send name, *args, &block
end
|
Instance Method Details
#items ⇒ Object
60
61
62
|
# File 'lib/ydim/html/state/invoice.rb', line 60
def items
@items ||= @invoice.items
end
|
#respond_to?(*args) ⇒ Boolean
66
67
68
|
# File 'lib/ydim/html/state/invoice.rb', line 66
def respond_to? *args
@invoice.respond_to?(*args) || super
end
|
#reverse! ⇒ Object
63
64
65
|
# File 'lib/ydim/html/state/invoice.rb', line 63
def reverse!
items.reverse!
end
|
#sort!(&block) ⇒ Object
69
70
71
|
# File 'lib/ydim/html/state/invoice.rb', line 69
def sort! &block
items.sort! &block
end
|
#update! ⇒ Object
72
73
74
|
# File 'lib/ydim/html/state/invoice.rb', line 72
def update!
@items = nil
end
|