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
16 17 18 |
# File 'lib/rumember.rb', line 16 def dispatch(method, params = {}) parent.dispatch(method, self.params.merge(params)) end |
#lists ⇒ Object
26 27 28 29 30 |
# File 'lib/rumember.rb', line 26 def lists dispatch('lists.getList')['lists']['list'].map do |list| List.new(self, list) end end |
#locations ⇒ Object
32 33 34 35 36 |
# File 'lib/rumember.rb', line 32 def locations dispatch('locations.getList')['locations']['location'].map do |list| Location.new(self, list) end end |
#transaction_dispatch(*args) {|response| ... } ⇒ Object
20 21 22 23 24 |
# File 'lib/rumember.rb', line 20 def transaction_dispatch(*args) response = dispatch(*args) yield response if block_given? Transaction.new(self, response) end |