Class: Clearbit::Analytics
- Inherits:
-
Object
- Object
- Clearbit::Analytics
- Includes:
- Logging
- Defined in:
- lib/clearbit/analytics.rb,
lib/clearbit/analytics/utils.rb,
lib/clearbit/analytics/client.rb,
lib/clearbit/analytics/worker.rb,
lib/clearbit/analytics/logging.rb,
lib/clearbit/analytics/request.rb,
lib/clearbit/analytics/defaults.rb,
lib/clearbit/analytics/response.rb,
lib/clearbit/analytics/field_parser.rb,
lib/clearbit/analytics/message_batch.rb,
lib/clearbit/analytics/backoff_policy.rb
Defined Under Namespace
Modules: Defaults, Logging, Utils Classes: BackoffPolicy, Client, FieldParser, MessageBatch, PrefixedLogger, Request, Response, Worker
Class Method Summary collapse
-
.group(args) ⇒ Object
Proxy group through to a client instance, in order to keep the client consistent with how the other Clearbit APIs are accessed.
-
.identify(args) ⇒ Object
Proxy identify through to a client instance, in order to keep the client consistent with how the other Clearbit APIs are accessed.
-
.page(args) ⇒ Object
Proxy page through to a client instance, in order to keep the client consistent with how the other Clearbit APIs are accessed.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Analytics
constructor
Initializes a new instance of Client, to which all method calls are proxied.
- #method_missing(message, *args, &block) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Methods included from Logging
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(message, *args, &block) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/clearbit/analytics.rb', line 48 def method_missing(, *args, &block) if @client.respond_to? @client.send , *args, &block else super end end |
Class Method Details
.group(args) ⇒ Object
Proxy group through to a client instance, in order to keep the client consistent with how the other Clearbit APIs are accessed
30 31 32 33 34 |
# 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) ⇒ Object
Proxy identify through to a client instance, in order to keep the client consistent with how the other Clearbit APIs are accessed
14 15 16 17 18 |
# File 'lib/clearbit/analytics.rb', line 14 def self.identify(args) analytics = new(write_key: Clearbit.key) analytics.identify(args) analytics.flush end |
.page(args) ⇒ Object
Proxy page through to a client instance, in order to keep the client consistent with how the other Clearbit APIs are accessed
22 23 24 25 26 |
# File 'lib/clearbit/analytics.rb', line 22 def self.page(args) analytics = new(write_key: Clearbit.key) analytics.page(args) analytics.flush end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
56 57 58 |
# File 'lib/clearbit/analytics.rb', line 56 def respond_to_missing?(method_name, include_private = false) @client.respond_to?(method_name) || super end |