Module: Path::Reporting
- Defined in:
- lib/path/reporting.rb,
lib/path/reporting/version.rb,
lib/path/reporting/analytics.rb,
lib/path/reporting/configuration.rb,
lib/path/reporting/types/trigger.rb,
lib/path/reporting/types/user_type.rb,
lib/path/reporting/analytics/console.rb,
lib/path/reporting/analytics/amplitude.rb,
lib/path/reporting/analytics/configuration.rb
Overview
The Reporting
module is our general, all-purpose reporting tool for
analytics, metrics, performance, and any other data. This module is
meant to be a one-stop shop for all of our ruby code to import and have
everything they need to track all the things
Defined Under Namespace
Classes: Analytics, Configuration, Trigger, UserType
Constant Summary collapse
- VERSION =
Current version of the module
"0.2.3"
Class Method Summary collapse
-
.analytics ⇒ Analytics
The configured analytics reporting module.
-
.init {|config| ... } ⇒ self
Initialize our reporting setup.
Class Method Details
.analytics ⇒ Analytics
Returns the configured analytics reporting module.
52 53 54 55 56 |
# File 'lib/path/reporting.rb', line 52 def analytics raise Error, "Must call init on Path::Reporting library before using" unless @initialized @analytics end |
.init {|config| ... } ⇒ self
Initialize our reporting setup. This is required to call before the module is ready to use.
To configure this module, pass in a block that accepts a Configuration parameter. Using this parameter you can setup any reporting systems that you need.
Each sub-type of reporting will have its own configuration. For example,
to configure analytics reporting, you can use the analytics
property
on the Configuration object passed in, which will be an instance of
Path::Reporting::Analytics::Configuration.
41 42 43 44 45 46 47 48 |
# File 'lib/path/reporting.rb', line 41 def init @initialized = true @config = Configuration.new yield(@config) if block_given? @analytics = Path::Reporting::Analytics.new @config self end |