class TinyIRC::App

Attributes

bot[RW]

Public Class Methods

cfg(bot) click to toggle source
# File lib/tinyirc/app.rb, line 31
def self.cfg(bot)
  TinyIRC::App.bot = bot
  configure do
    disable :show_exceptions

    set :clean_trace, true

    set :public_folder, File.dirname(__FILE__) + '/public'
    set :views, File.dirname(__FILE__) + '/views'

    set :bind, ENV['HOST'] || '0.0.0.0'
    set :port, (ENV['PORT'] || 8080).to_i
  
    disable :logging
  end
end

Public Instance Methods

h(text) click to toggle source
# File lib/tinyirc/app.rb, line 49
def h(text)
  Rack::Utils.escape_html(text)
end