yes
This commit is contained in:
parent
d1fcac827d
commit
ac2dd66f36
28
hyde.rb
28
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
|
||||
|
|
Loading…
Reference in New Issue