Class: GoogleAnalyticsOnRails::GoogleAnalytics
- Inherits:
-
Object
- Object
- GoogleAnalyticsOnRails::GoogleAnalytics
- Defined in:
- lib/google_analytics_on_rails.rb
Instance Attribute Summary collapse
-
#tracker_id ⇒ Object
Returns the value of attribute tracker_id.
Instance Method Summary collapse
-
#initialize(*args) ⇒ GoogleAnalytics
constructor
A new instance of GoogleAnalytics.
- #validate! ⇒ Object
Constructor Details
#initialize(*args) ⇒ GoogleAnalytics
Returns a new instance of GoogleAnalytics.
36 37 38 39 |
# File 'lib/google_analytics_on_rails.rb', line 36 def initialize(*args) = args. @tracker_id = args.shift end |
Instance Attribute Details
#tracker_id ⇒ Object
Returns the value of attribute tracker_id.
34 35 36 |
# File 'lib/google_analytics_on_rails.rb', line 34 def tracker_id @tracker_id end |
Instance Method Details
#validate! ⇒ Object
41 42 43 |
# File 'lib/google_analytics_on_rails.rb', line 41 def validate! raise InvalidProfile, "TrackerId is missing or invalid" if tracker_id.blank? end |