Sha256: 4bae0f5cda2db149fa1db192a3f0317e5dde1eece81c9b71fc16ff3c0b9057fa
Contents?: true
Size: 734 Bytes
Versions: 1
Compression:
Stored size: 734 Bytes
Contents
module Apitizer module Routing module Node class Base def append(child) children << child end def trace(steps, path = Path.new) return nil unless recognize?(steps) steps, path = steps.clone, path.clone walk(steps, path) return path if steps.empty? children.each do |child| branch = child.trace(steps, path) return branch if branch end nil end def recognize?(steps) end def permit?(action, on:) end private def walk(steps, path) end def children @children ||= [] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
apitizer-0.0.2 | lib/apitizer/routing/node/base.rb |