Module: Rumember::Dispatcher

Included in:
Abstract, Account, Timeline
Defined in:
lib/rumember.rb

Instance Method Summary collapse

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

#listsObject



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

#locationsObject



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

Yields:

  • (response)


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