Class: WEBrickNIO::HTTPServer::MountTable
- Inherits:
-
Object
- Object
- WEBrickNIO::HTTPServer::MountTable
- Defined in:
- lib/webricknio/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.
449 450 451 452 |
# File 'lib/webricknio/httpserver.rb', line 449 def initialize @tab = Hash.new compile end |
Instance Method Details
#[](dir) ⇒ Object
454 455 456 457 |
# File 'lib/webricknio/httpserver.rb', line 454 def [](dir) dir = normalize(dir) @tab[dir] end |
#[]=(dir, val) ⇒ Object
459 460 461 462 463 464 |
# File 'lib/webricknio/httpserver.rb', line 459 def []=(dir, val) dir = normalize(dir) @tab[dir] = val compile val end |
#delete(dir) ⇒ Object
466 467 468 469 470 471 |
# File 'lib/webricknio/httpserver.rb', line 466 def delete(dir) dir = normalize(dir) res = @tab.delete(dir) compile res end |
#scan(path) ⇒ Object
473 474 475 476 |
# File 'lib/webricknio/httpserver.rb', line 473 def scan(path) @scanner =~ path [ $&, $' ] end |