Class: InterceptorChain

Inherits:
Object
  • Object
show all
Defined in:
lib/spank/interceptor_chain.rb

Instance Method Summary collapse

Constructor Details

#initialize(interceptors = []) ⇒ InterceptorChain

Returns a new instance of InterceptorChain.



2
3
4
# File 'lib/spank/interceptor_chain.rb', line 2

def initialize(interceptors = [])
  @interceptors = interceptors
end

Instance Method Details

#each(&block) ⇒ Object



10
11
12
# File 'lib/spank/interceptor_chain.rb', line 10

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

#push(interceptor) ⇒ Object



6
7
8
# File 'lib/spank/interceptor_chain.rb', line 6

def push(interceptor)
  @interceptors.push(interceptor)
end