Class: Koko::Tracker

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/koko/tracker.rb,
lib/koko/tracker/utils.rb,
lib/koko/tracker/client.rb,
lib/koko/tracker/logging.rb,
lib/koko/tracker/request.rb,
lib/koko/tracker/version.rb,
lib/koko/tracker/defaults.rb,
lib/koko/tracker/response.rb

Defined Under Namespace

Modules: Defaults, Logging, Utils Classes: Client, Request, Response

Constant Summary collapse

VERSION =
'0.0.6'

Instance Method Summary collapse

Methods included from Logging

included, logger, #logger, logger=

Constructor Details

#initialize(options = {}) ⇒ Tracker

Returns a new instance of Tracker.



11
12
13
14
# File 'lib/koko/tracker.rb', line 11

def initialize options = {}
  Request.stub = options[:stub] if options.has_key?(:stub)
  @client = Koko::Tracker::Client.new options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(message, *args, &block) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/koko/tracker.rb', line 16

def method_missing message, *args, &block
  if @client.respond_to? message
    @client.send message, *args, &block
  else
    super
  end
end

Instance Method Details

#respond_to?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/koko/tracker.rb', line 24

def respond_to? method_name, include_private = false
  @client.respond_to?(method_name) || super
end