class Spank::InterceptorChain
Public Class Methods
new(interceptors = [])
click to toggle source
# File lib/spank/interceptor_chain.rb, line 3 def initialize(interceptors = []) @interceptors = interceptors end
Public Instance Methods
each(&block)
click to toggle source
# File lib/spank/interceptor_chain.rb, line 11 def each(&block) @interceptors.each(&block) end
intercept(invocation)
click to toggle source
# File lib/spank/interceptor_chain.rb, line 15 def intercept(invocation) each do |interceptor| interceptor.intercept(invocation) end end
push(interceptor)
click to toggle source
# File lib/spank/interceptor_chain.rb, line 7 def push(interceptor) @interceptors.push(interceptor) end