module RabbotWebServer
RabbotWebServer — optional background WEBrick static file server per bot. Public: start, stop, running?, port Depends: RabbotWeb Tests: test/lib/rabbot_web_server_test.rb
Public Instance Methods
Source
# File lib/rabbot_web_server.rb, line 14 def start(config) web = config.web_config return nil unless RabbotWeb.enabled?(web) unless File.directory?(web[:root]) warn "RabbotWebServer: skipping — root not found: #{web[:root]} (run: bundle exec rake doc)" return nil end handle = ServerHandle.new(web) handle.start handle end