Class: Itly::Plugin::Snowplow::PageOptions
- Inherits:
-
CallOptions
- Object
- Itly::PluginCallOptions
- CallOptions
- Itly::Plugin::Snowplow::PageOptions
- Defined in:
- lib/itly/plugin/snowplow/call_options.rb
Overview
Snowplow specific plugin options class for calls to page
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) ⇒ PageOptions
constructor
A new instance of PageOptions.
- #to_s ⇒ Object
Constructor Details
#initialize(contexts: nil, callback: nil) ⇒ PageOptions
Returns a new instance of PageOptions.
19 20 21 22 23 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 19 def initialize(contexts: nil, callback: nil) super() @contexts = contexts @callback = callback end |
Instance Attribute Details
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
17 18 19 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 17 def callback @callback end |
#contexts ⇒ Object (readonly)
Returns the value of attribute contexts.
17 18 19 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 17 def contexts @contexts end |
Instance Method Details
#to_s ⇒ Object
25 26 27 28 29 |
# File 'lib/itly/plugin/snowplow/call_options.rb', line 25 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 |