Class: WEBrick::HTTPServer::MountTable

Inherits:
Object
  • Object
show all
Defined in:
lib/webrick/httpserver.rb

Instance Method Summary collapse

Constructor Details

#initializeMountTable



164
165
166
167
# File 'lib/webrick/httpserver.rb', line 164

def initialize
  @tab = Hash.new
  compile
end

Instance Method Details

#[](dir) ⇒ Object



169
170
171
172
# File 'lib/webrick/httpserver.rb', line 169

def [](dir)
  dir = normalize(dir)
  @tab[dir]
end

#[]=(dir, val) ⇒ Object



174
175
176
177
178
179
# File 'lib/webrick/httpserver.rb', line 174

def []=(dir, val)
  dir = normalize(dir)
  @tab[dir] = val
  compile
  val
end

#delete(dir) ⇒ Object



181
182
183
184
185
186
# File 'lib/webrick/httpserver.rb', line 181

def delete(dir)
  dir = normalize(dir)
  res = @tab.delete(dir)
  compile
  res
end

#scan(path) ⇒ Object



188
189
190
191
# File 'lib/webrick/httpserver.rb', line 188

def scan(path)
  @scanner =~ path
  [ $&, $' ]
end