diff --git a/hyde.rb b/hyde.rb index 1348f18..1937b93 100644 --- a/hyde.rb +++ b/hyde.rb @@ -1,15 +1,33 @@ -require 'webrick' - module Hyde - class Pathspec - def initialize (path, &block) - @path = path.split "/" if path.kind_of? String + class Servlet + def initialize (path, &block_optional) + + end + end + class Pathspec + def initialize (path, &block, root: nil) + @path = (path.split "/").filter {|x| x != ""} if path.kind_of? String @path = [path] if path.kind_of? Regexp @chain = [] + @root_override = root + @remap = false self.instance_eval &block end def path(*a, **b, &block) @chain.append Hyde::Pathspec.new *a, **b, &block end + def root(path) + @root_override = root + end + def remap(path) + @root_override = root + @remap = true + end + def match(path) + + end + def match?(path) + + end end end