Module: AnalyticsRuby::ClassMethods
- Included in:
- AnalyticsRuby
- Defined in:
- lib/analytics_ruby_mock.rb
Instance Attribute Summary collapse
-
#alias_calls ⇒ Object
Returns the value of attribute alias_calls.
-
#identify_calls ⇒ Object
Returns the value of attribute identify_calls.
-
#track_calls ⇒ Object
Returns the value of attribute track_calls.
Instance Method Summary collapse
-
#alias(options) ⇒ Object
Alias #####################################################.
- #clear ⇒ Object
-
#debug ⇒ Object
Mock Interface ############################################.
-
#flush ⇒ Object
Flush #####################################################.
-
#identify(options) ⇒ Object
Identify ##################################################.
-
#track(options) ⇒ Object
Track #####################################################.
- #tracked_events ⇒ Object
Instance Attribute Details
#alias_calls ⇒ Object
Returns the value of attribute alias_calls.
3 4 5 |
# File 'lib/analytics_ruby_mock.rb', line 3 def alias_calls @alias_calls end |
#identify_calls ⇒ Object
Returns the value of attribute identify_calls.
3 4 5 |
# File 'lib/analytics_ruby_mock.rb', line 3 def identify_calls @identify_calls end |
#track_calls ⇒ Object
Returns the value of attribute track_calls.
3 4 5 |
# File 'lib/analytics_ruby_mock.rb', line 3 def track_calls @track_calls end |
Instance Method Details
#alias(options) ⇒ Object
Alias #####################################################
32 33 34 35 36 37 |
# File 'lib/analytics_ruby_mock.rb', line 32 def alias() (:alias, ) initialize if @alias_calls.nil? @alias_calls << end |
#clear ⇒ Object
53 54 55 |
# File 'lib/analytics_ruby_mock.rb', line 53 def clear initialize end |
#debug ⇒ Object
Mock Interface ############################################
49 50 51 |
# File 'lib/analytics_ruby_mock.rb', line 49 def debug @debug = true end |
#flush ⇒ Object
Flush #####################################################
42 43 44 |
# File 'lib/analytics_ruby_mock.rb', line 42 def flush (:flush) end |
#identify(options) ⇒ Object
Identify ##################################################
22 23 24 25 26 27 |
# File 'lib/analytics_ruby_mock.rb', line 22 def identify() (:identify, ) initialize if @identify_calls.nil? @identify_calls << end |
#track(options) ⇒ Object
Track #####################################################
8 9 10 11 12 13 |
# File 'lib/analytics_ruby_mock.rb', line 8 def track() (:track, ) initialize if @track_calls.nil? @track_calls << end |
#tracked_events ⇒ Object
15 16 17 |
# File 'lib/analytics_ruby_mock.rb', line 15 def tracked_events (@track_calls || []).collect { |t| t[:event] } end |