class AntiCaptcha::Configuration

Public Class Methods

config_key(key, default_value = nil) click to toggle source
# File lib/anti-captcha/configuration.rb, line 6
def self.config_key(key, default_value = nil)
  attr_accessor key
  @@config_keys << key
  if default_value
    define_method key do
      instance_variable_get(:"@#{key}") || default_value
    end
  end
end

Public Instance Methods

options() click to toggle source
# File lib/anti-captcha/configuration.rb, line 25
def options
  @@config_keys.each_with_object({}) do |key, hash|
    hash[key] = __send__(key) if __send__(key)
  end
end