Class: WEBrick::HTTPServer::MountTable
- Inherits:
-
Object
- Object
- WEBrick::HTTPServer::MountTable
- Defined in:
- lib/webrick/httpserver.rb
Instance Method Summary collapse
- #[](dir) ⇒ Object
- #[]=(dir, val) ⇒ Object
- #delete(dir) ⇒ Object
-
#initialize ⇒ MountTable
constructor
A new instance of MountTable.
- #scan(path) ⇒ Object
Constructor Details
#initialize ⇒ MountTable
Returns a new instance of MountTable.
218 219 220 221 |
# File 'lib/webrick/httpserver.rb', line 218 def initialize @tab = Hash.new compile end |
Instance Method Details
#[](dir) ⇒ Object
223 224 225 226 |
# File 'lib/webrick/httpserver.rb', line 223 def [](dir) dir = normalize(dir) @tab[dir] end |
#[]=(dir, val) ⇒ Object
228 229 230 231 232 233 |
# File 'lib/webrick/httpserver.rb', line 228 def []=(dir, val) dir = normalize(dir) @tab[dir] = val compile val end |
#delete(dir) ⇒ Object
235 236 237 238 239 240 |
# File 'lib/webrick/httpserver.rb', line 235 def delete(dir) dir = normalize(dir) res = @tab.delete(dir) compile res end |
#scan(path) ⇒ Object
242 243 244 245 |
# File 'lib/webrick/httpserver.rb', line 242 def scan(path) @scanner =~ path [ $&, $' ] end |