Class: Itly::Plugin::Snowplow::TrackOptions
- Inherits:
-
CallOptions
- Object
- Itly::PluginCallOptions
- CallOptions
- Itly::Plugin::Snowplow::TrackOptions
- Defined in:
- lib/itly/plugin/snowplow/call_options.rb
Overview
Snowplow specific plugin options class for calls to track
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#contexts ⇒ Object
readonly
Returns the value of attribute contexts.
Instance Method Summary collapse
-
#initialize(contexts: nil, callback: nil) ⇒ TrackOptions
constructor
A new instance of TrackOptions.
- #to_s ⇒ Object
Constructor Details
#initialize(contexts: nil, callback: nil) ⇒ TrackOptions
Returns a new instance of TrackOptions.
38 39 40 41 42 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 38 def initialize(contexts: nil, callback: nil) super() @contexts = contexts @callback = callback end |
Instance Attribute Details
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
36 37 38 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 36 def callback @callback end |
#contexts ⇒ Object (readonly)
Returns the value of attribute contexts.
36 37 38 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 36 def contexts @contexts end |
Instance Method Details
#to_s ⇒ Object
44 45 46 47 48 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 44 def to_s class_name = self.class.name.split('::').last contexts_str = contexts.nil? ? 'nil' : "[#{contexts.collect(&:to_s).join ', '}]" "#<Snowplow::#{class_name} contexts: #{contexts_str} callback: #{callback.nil? ? 'nil' : 'provided'}>" end |