Class: Typekit::Routing::Node::Scope

Inherits:
Base
  • Object
show all
Defined in:
lib/typekit/routing/node/scope.rb

Instance Method Summary collapse

Methods inherited from Base

#append, #assemble, #permitted?

Constructor Details

#initialize(path) ⇒ Scope

Returns a new instance of Scope.



5
6
7
# File 'lib/typekit/routing/node/scope.rb', line 5

def initialize(path)
  @path = Array(path)
end

Instance Method Details

#match(name) ⇒ Object



9
10
11
# File 'lib/typekit/routing/node/scope.rb', line 9

def match(name)
  !lookup(name).nil?
end

#process(request, path) ⇒ Object



13
14
15
# File 'lib/typekit/routing/node/scope.rb', line 13

def process(request, path)
  @path.each { |chunk| request << chunk }
end