Class: Rack::PathRecorder

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/headercontrol.rb

Instance Method Summary collapse

Constructor Details

#initializePathRecorder

Returns a new instance of PathRecorder.



28
29
30
# File 'lib/rack/headercontrol.rb', line 28

def initialize
  @paths = {} 
end

Instance Method Details

#[](path) ⇒ Object



36
37
38
# File 'lib/rack/headercontrol.rb', line 36

def [](path)
  @paths[path]
end

#each(&block) ⇒ Object



40
41
42
# File 'lib/rack/headercontrol.rb', line 40

def each(&block)
  @paths.each(&block)
end

#path(path, &block) ⇒ Object



32
33
34
# File 'lib/rack/headercontrol.rb', line 32

def path(path, &block)
  @paths[path] = block
end