Class: AhoyCaptain::Funnel

Inherits:
Object
  • Object
show all
Defined in:
lib/ahoy_captain/funnels.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFunnel

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

#goalsObject (readonly)

Returns the value of attribute goals.



4
5
6
# File 'lib/ahoy_captain/funnels.rb', line 4

def goals
  @goals
end

#idObject

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

#titleObject



20
21
22
# File 'lib/ahoy_captain/funnels.rb', line 20

def title
  @label
end