class Awestruct::HandlerChain
Attributes
handler_classes[R]
matcher[R]
Public Class Methods
new(matcher, *handler_classes)
click to toggle source
# File lib/awestruct/handler_chain.rb, line 8 def initialize(matcher, *handler_classes) @matcher = matcher @handler_classes = handler_classes end
Public Instance Methods
create(site, path)
click to toggle source
# File lib/awestruct/handler_chain.rb, line 17 def create(site, path) cur = path @handler_classes.each do |cls| cur = cls.new( site, cur ) end cur end
matches?(path)
click to toggle source
# File lib/awestruct/handler_chain.rb, line 13 def matches?(path) @matcher.match( path ) end