public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Search Repo:
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
francois (author)
Mon Mar 10 20:32:38 -0700 2008
commit  5528126ec61fdffc7cb5e6f20769f98876d002f1
tree    594598c7159812e653312a3c19380b4b12899c38
parent  a845a68630cb4c6f3c6827fac5d34709afd047ec
mephisto / vendor / plugins / viking / lib / viking.rb
100644 28 lines (23 sloc) 0.962 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Viking
  class Error < StandardError; end
  
  class << self
    attr_accessor :logger
    attr_accessor :default_engine
    attr_accessor :connect_options
    attr_writer :default_instance
 
    def default_instance
      @default_instance ||= connect(default_engine, connect_options)
    end
  
    def connect(engine, options)
      require "viking/#{engine}"
      Viking.const_get(engine.to_s.capitalize).new(options)
    end
    
    def verified?() default_instance.verified?; end
    def check_article(options = {}) default_instance.check_article(options); end
    def check_comment(options = {}) default_instance.check_comment(options); end
    def mark_as_spam(options = {}) default_instance.mark_as_spam(options); end
    def mark_as_ham(options = {}) default_instance.mark_as_ham(options); end
    def stats() default_instance.stats; end
  end
end
 
require 'viking/base'