class Clearbit::Analytics
Public Class Methods
group(args)
click to toggle source
Proxy group through to a client instance, in order to keep the client consistent with how the other Clearbit
APIs are accessed
# File lib/clearbit/analytics.rb, line 30 def self.group(args) analytics = new(write_key: Clearbit.key) analytics.group(args) analytics.flush end
identify(args)
click to toggle source
Proxy identify through to a client instance, in order to keep the client consistent with how the other Clearbit
APIs are accessed
# File lib/clearbit/analytics.rb, line 14 def self.identify(args) analytics = new(write_key: Clearbit.key) analytics.identify(args) analytics.flush end
new(options = {})
click to toggle source
Initializes a new instance of {Clearbit::Analytics::Client}, to which all method calls are proxied.
@param options includes options that are passed down to
{Clearbit::Analytics::Client#initialize}
@option options [Boolean] :stub (false) If true, requests don't hit the
server and are stubbed to be successful.
# File lib/clearbit/analytics.rb, line 43 def initialize(options = {}) Request.stub = options[:stub] if options.has_key?(:stub) @client = Clearbit::Analytics::Client.new options end
page(args)
click to toggle source
Proxy page through to a client instance, in order to keep the client consistent with how the other Clearbit
APIs are accessed
# File lib/clearbit/analytics.rb, line 22 def self.page(args) analytics = new(write_key: Clearbit.key) analytics.page(args) analytics.flush end
Public Instance Methods
method_missing(message, *args, &block)
click to toggle source
Calls superclass method
# File lib/clearbit/analytics.rb, line 48 def method_missing(message, *args, &block) if @client.respond_to? message @client.send message, *args, &block else super end end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/clearbit/analytics.rb, line 56 def respond_to_missing?(method_name, include_private = false) @client.respond_to?(method_name) || super end