Class: AhoyCaptain::Funnel
- Inherits:
-
Object
- Object
- AhoyCaptain::Funnel
- Defined in:
- lib/ahoy_captain/funnels.rb
Instance Attribute Summary collapse
-
#goals ⇒ Object
readonly
Returns the value of attribute goals.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #goal(id) ⇒ Object
-
#initialize ⇒ Funnel
constructor
A new instance of Funnel.
- #label(value) ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize ⇒ Funnel
Returns a new instance of Funnel.
6 7 8 9 10 |
# File 'lib/ahoy_captain/funnels.rb', line 6 def initialize @id = nil @label = nil @goals = [] end |
Instance Attribute Details
#goals ⇒ Object (readonly)
Returns the value of attribute goals.
4 5 6 |
# File 'lib/ahoy_captain/funnels.rb', line 4 def goals @goals end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/ahoy_captain/funnels.rb', line 3 def id @id end |
Instance Method Details
#goal(id) ⇒ Object
12 13 14 |
# File 'lib/ahoy_captain/funnels.rb', line 12 def goal(id) @goals << AhoyCaptain.config.goals[id] end |
#label(value) ⇒ Object
16 17 18 |
# File 'lib/ahoy_captain/funnels.rb', line 16 def label(value) @label = value end |
#title ⇒ Object
20 21 22 |
# File 'lib/ahoy_captain/funnels.rb', line 20 def title @label end |