Class: IrcCat::HttpServer
- Inherits:
-
Object
- Object
- IrcCat::HttpServer
- Defined in:
- lib/irc_cat/http_server.rb
Instance Method Summary collapse
-
#initialize(bot, config, ip, port) ⇒ HttpServer
constructor
A new instance of HttpServer.
Constructor Details
#initialize(bot, config, ip, port) ⇒ HttpServer
Returns a new instance of HttpServer.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/irc_cat/http_server.rb', line 17 def initialize(bot, config, ip, port) @bot = bot @config = config puts "Starting HTTP (#{ip}:#{port})" h = Mongrel::HttpServer.new(ip, port) h.register("/", Index.new) h.register("/send", Send.new(@bot, @config)) if @config['http']['send'] == true h.register("/github", Github.new(@bot, @config)) if @config['http']['github'] == true h.run.join end |