Module: Ribbon::Intercom

Defined in:
lib/ribbon/intercom.rb,
lib/ribbon/intercom/utils.rb,
lib/ribbon/intercom/client.rb,
lib/ribbon/intercom/errors.rb,
lib/ribbon/intercom/packet.rb,
lib/ribbon/intercom/package.rb,
lib/ribbon/intercom/railtie.rb,
lib/ribbon/intercom/service.rb,
lib/ribbon/intercom/version.rb,
lib/ribbon/intercom/client/sdk.rb,
lib/ribbon/intercom/packageable.rb,
lib/ribbon/intercom/utils/mixins.rb,
lib/ribbon/intercom/utils/signer.rb,
lib/ribbon/intercom/client/mock_sdk.rb,
lib/ribbon/intercom/service/channel.rb,
lib/ribbon/intercom/packageable/mixin.rb,
lib/ribbon/intercom/utils/method_chain.rb,
lib/ribbon/intercom/client/sdk/adapters.rb,
lib/ribbon/intercom/packet/method_queue.rb,
lib/ribbon/intercom/service/channel/stores.rb,
lib/ribbon/intercom/utils/mixins/mock_safe.rb,
lib/ribbon/intercom/client/sdk/adapters/adapter.rb,
lib/ribbon/intercom/service/channel/stores/store.rb,
lib/ribbon/intercom/client/sdk/adapters/http_adapter.rb,
lib/ribbon/intercom/client/sdk/adapters/mock_adapter.rb,
lib/ribbon/intercom/client/sdk/adapters/local_adapter.rb,
lib/ribbon/intercom/service/channel/stores/mock_store.rb,
lib/ribbon/intercom/service/channel/stores/redis_store.rb,
lib/ribbon/intercom/client/sdk/adapters/adapter/response.rb,
lib/ribbon/intercom/client/sdk/adapters/http_adapter/connection.rb

Defined Under Namespace

Modules: Errors, Utils Classes: Client, Package, Packageable, Packet, Railtie, Service

Constant Summary collapse

VERSION =
'0.4.2'

Class Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object (private)



23
24
25
# File 'lib/ribbon/intercom.rb', line 23

def method_missing(meth, *args, &block)
  client.send(meth, *args, &block)
end

Class Method Details

.clientObject



27
28
29
# File 'lib/ribbon/intercom.rb', line 27

def client
  @_client ||= Client.new
end

.load_tasksObject



17
18
19
20
21
# File 'lib/ribbon/intercom.rb', line 17

def load_tasks
  Dir[
    File.expand_path("../../tasks", __FILE__) + '/**.rake'
  ].each { |rake_file| load rake_file }
end

.method_missing(meth, *args, &block) ⇒ Object



23
24
25
# File 'lib/ribbon/intercom.rb', line 23

def method_missing(meth, *args, &block)
  client.send(meth, *args, &block)
end

.mock_safeObject



31
32
33
34
35
36
37
# File 'lib/ribbon/intercom.rb', line 31

def mock_safe
  orig_client = client
  @_client = @_client.mock_safe
  yield
ensure
  @_client = orig_client
end