Class: AnalyticsInstrumentation::Config
- Inherits:
-
Object
- Object
- AnalyticsInstrumentation::Config
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/analytics_instrumentation/config.rb
Defined Under Namespace
Classes: Invalid
Constant Summary collapse
- @@REQUIRED_CALLABLES =
[ :extra_event_properties, :custom_user_traits, :error_handler ]
Instance Attribute Summary collapse
-
#custom_user_traits ⇒ Object
Returns the value of attribute custom_user_traits.
-
#error_handler ⇒ Object
Returns the value of attribute error_handler.
-
#extra_event_properties ⇒ Object
Returns the value of attribute extra_event_properties.
-
#segment_write_key ⇒ Object
Returns the value of attribute segment_write_key.
-
#track_ajax_as_page_view ⇒ Object
Returns the value of attribute track_ajax_as_page_view.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #intercom? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
29 30 31 32 33 34 |
# File 'lib/analytics_instrumentation/config.rb', line 29 def initialize self.extra_event_properties = Proc.new {} self.custom_user_traits = Proc.new {} self.error_handler = Proc.new { |e, msg=""| raise } self.track_ajax_as_page_view = false end |
Instance Attribute Details
#custom_user_traits ⇒ Object
Returns the value of attribute custom_user_traits.
8 9 10 |
# File 'lib/analytics_instrumentation/config.rb', line 8 def custom_user_traits @custom_user_traits end |
#error_handler ⇒ Object
Returns the value of attribute error_handler.
9 10 11 |
# File 'lib/analytics_instrumentation/config.rb', line 9 def error_handler @error_handler end |
#extra_event_properties ⇒ Object
Returns the value of attribute extra_event_properties.
7 8 9 |
# File 'lib/analytics_instrumentation/config.rb', line 7 def extra_event_properties @extra_event_properties end |
#segment_write_key ⇒ Object
Returns the value of attribute segment_write_key.
10 11 12 |
# File 'lib/analytics_instrumentation/config.rb', line 10 def segment_write_key @segment_write_key end |
#track_ajax_as_page_view ⇒ Object
Returns the value of attribute track_ajax_as_page_view.
11 12 13 |
# File 'lib/analytics_instrumentation/config.rb', line 11 def track_ajax_as_page_view @track_ajax_as_page_view end |
Instance Method Details
#intercom? ⇒ Boolean
36 37 38 |
# File 'lib/analytics_instrumentation/config.rb', line 36 def intercom? Intercom rescue false end |