Class: Fem
- Inherits:
-
WebserverAbstract
- Object
- WebserverAbstract
- Fem
- Defined in:
- lib/femtows.rb
Overview
another api
Constant Summary
Constants inherited from WebserverAbstract
WebserverAbstract::LICON, WebserverAbstract::MIME
Instance Method Summary collapse
-
#initialize(port = 7080, root = ".", name = "wwww", cadence = 10, timeout = 120) ⇒ Fem
constructor
A new instance of Fem.
- #introspect ⇒ Object
Methods inherited from WebserverAbstract
#do_service, #error, #escape, #hescape, #httpdate, #info, #logg, #makeIndex, #mime, #n3, #observe, #pool_create, #pool_get, #read_header, #redirect, #request, #run, #sendData, #sendError, #sendFile, #serve, #stop_browser, #to_absolute, #to_relative, #to_table, #to_tableb, #unescape
Constructor Details
Instance Method Details
#introspect ⇒ Object
269 270 271 272 273 274 275 |
# File 'lib/femtows.rb', line 269 def introspect() exp=/^(get|post)_(\w[\w\d]*)_(\w+)$/ methods.grep(exp).each { |name| all,method,key,mime= exp.match(name).to_a serve("/#{key}") { |par| [200,".#{mime}",self.send(all,par)] } } end |