kert-io/mail_runner

View on GitHub
lib/mail_runner.rb

Summary

Maintainability
A
0 mins
Test Coverage
Dir[File.dirname(__FILE__) + '/mail_runner/*.rb'].each {|file| require file }

module MailRunner
  $redis = Redis.new(:host => 'localhost')
  
  def self.set_globals
    $logger = MailRunner::Logging.logger
    $mad_statter = MailRunner::MadStatter
    $logger.debug { "Mailrunner initialized in debug mode." }
  end

  def self.manager_bot
      defined?(@manager_bot) ? @manager_bot : initialize_manager_bot
  end

  def self.initialize_manager_bot
      @manager_bot = MailRunner::ManagerBot.new
      $logger.debug { "ManagerBot initialized."}
      return @manager_bot
  end
end