Module: Rumember::Dispatcher

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

Instance Method Summary collapse

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

#listsObject



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

#locationsObject



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

Yields:

  • (response)


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