class Captcha::Config
Constants
- ONE_DAY
- PRODUCTION
- ROOT
Public Class Methods
captchas()
click to toggle source
# File lib/captcha/config.rb, line 56 def self.captchas Dir["#{@@options[:destination]}/*.jpg"] end
codes()
click to toggle source
# File lib/captcha/config.rb, line 60 def self.codes self.captchas.collect do |f| File.basename f, '.jpg' end end
exists?(code)
click to toggle source
# File lib/captcha/config.rb, line 66 def self.exists?(code) File.exists?("#{@@options[:destination]}/#{code}.jpg") end
last_modified()
click to toggle source
# File lib/captcha/config.rb, line 74 def self.last_modified file = self.captchas.first if file && File.exists?(file) File.mtime(file) else nil end end
new(options={})
click to toggle source
# File lib/captcha/config.rb, line 52 def initialize(options={}) @@options.merge!(options) end
options()
click to toggle source
# File lib/captcha/config.rb, line 70 def self.options @@options end