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
-
.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.
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
32 33 34 35 36 37 38 |
# File 'lib/clearbit/analytics.rb', line 32 def method_missing(, *args, &block) if @client.respond_to? @client.send , *args, &block else super end end |
Class Method Details
.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 |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
40 41 42 |
# File 'lib/clearbit/analytics.rb', line 40 def respond_to_missing?(method_name, include_private = false) @client.respond_to?(method_name) || super end |