Module: Rumember::Dispatcher
Instance Method Summary collapse
- #dispatch(method, params = {}) ⇒ Object
- #lists ⇒ Object
- #locations ⇒ Object
- #transaction_dispatch(*args) {|response| ... } ⇒ Object
Instance Method Details
#dispatch(method, params = {}) ⇒ Object
15 16 17 |
# File 'lib/rumember.rb', line 15 def dispatch(method, params = {}) parent.dispatch(method, self.params.merge(params)) end |
#lists ⇒ Object
25 26 27 28 29 |
# File 'lib/rumember.rb', line 25 def lists dispatch('lists.getList')['lists']['list'].map do |list| List.new(self, list) end end |
#locations ⇒ Object
31 32 33 34 35 |
# File 'lib/rumember.rb', line 31 def locations dispatch('locations.getList')['locations']['location'].map do |list| Location.new(self, list) end end |
#transaction_dispatch(*args) {|response| ... } ⇒ Object
19 20 21 22 23 |
# File 'lib/rumember.rb', line 19 def transaction_dispatch(*args) response = dispatch(*args) yield response if block_given? Transaction.new(self, response) end |