Class: AhoyCaptain::FunnelCollection

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

Instance Method Summary collapse

Constructor Details

#initializeFunnelCollection

Returns a new instance of FunnelCollection.



28
29
30
# File 'lib/ahoy_captain/funnels.rb', line 28

def initialize
  @funnels = {}
end

Instance Method Details

#[](value) ⇒ Object



40
41
42
# File 'lib/ahoy_captain/funnels.rb', line 40

def [](value)
  @funnels[value.to_sym]
end

#each(&block) ⇒ Object



36
37
38
# File 'lib/ahoy_captain/funnels.rb', line 36

def each(&block)
  @funnels.each(&block)
end

#register(funnel) ⇒ Object



32
33
34
# File 'lib/ahoy_captain/funnels.rb', line 32

def register(funnel)
  @funnels[funnel.id] = funnel
end