Class: Send
- Inherits:
-
Mongrel::HttpHandler
- Object
- Mongrel::HttpHandler
- Send
- Defined in:
- lib/irc_cat/http_server/send.rb
Instance Method Summary collapse
-
#initialize(bot, config) ⇒ Send
constructor
A new instance of Send.
- #process(request, response) ⇒ Object
Constructor Details
#initialize(bot, config) ⇒ Send
Returns a new instance of Send.
3 |
# File 'lib/irc_cat/http_server/send.rb', line 3 def initialize(bot, config); @bot = bot; @config = config; end |
Instance Method Details
#process(request, response) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/irc_cat/http_server/send.rb', line 5 def process(request, response) response.start(200) do |head,out| head["Content-Type"] = "text/plain" = CGI::unescape("#{request.params['PATH_INFO'].gsub('/','')}") @bot.say(@config['irc']['channel'],"#{}") end end |