Class: TrailGuide::Metrics::Funnel
- Defined in:
- lib/trail_guide/metrics/funnel.rb
Overview
represents a funnel of goal checkpoints TODO this is mostly a placeholder for now
Instance Attribute Summary collapse
-
#experiment ⇒ Object
readonly
Returns the value of attribute experiment.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #as_json(opts = {}) ⇒ Object
- #dup(experiment) ⇒ Object
-
#initialize(experiment, name, checkpoints = []) ⇒ Funnel
constructor
A new instance of Funnel.
Methods inherited from Goal
#==, #===, #allow_conversion?, #configuration, #configure, #run_callbacks, #storage_key, #to_s
Constructor Details
#initialize(experiment, name, checkpoints = []) ⇒ Funnel
Returns a new instance of Funnel.
12 13 14 15 |
# File 'lib/trail_guide/metrics/funnel.rb', line 12 def initialize(experiment, name, checkpoints=[]) @experiment = experiment @name = name.to_s.underscore.to_sym end |
Instance Attribute Details
#experiment ⇒ Object (readonly)
Returns the value of attribute experiment.
6 7 8 |
# File 'lib/trail_guide/metrics/funnel.rb', line 6 def experiment @experiment end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/trail_guide/metrics/funnel.rb', line 6 def name @name end |
Instance Method Details
#as_json(opts = {}) ⇒ Object
17 18 19 20 21 |
# File 'lib/trail_guide/metrics/funnel.rb', line 17 def as_json(opts={}) { name: name, } end |
#dup(experiment) ⇒ Object
8 9 10 |
# File 'lib/trail_guide/metrics/funnel.rb', line 8 def dup(experiment) self.class.new(experiment, name) end |