Module: Kamcaptcha::Token
- Defined in:
- lib/kamcaptcha/token.rb
Class Attribute Summary collapse
-
.generator ⇒ Object
Returns the value of attribute generator.
-
.lookup ⇒ Object
Returns the value of attribute lookup.
-
.store ⇒ Object
Returns the value of attribute store.
Class Method Summary collapse
Class Attribute Details
.generator ⇒ Object
Returns the value of attribute generator.
4 5 6 |
# File 'lib/kamcaptcha/token.rb', line 4 def generator @generator end |
.lookup ⇒ Object
Returns the value of attribute lookup.
4 5 6 |
# File 'lib/kamcaptcha/token.rb', line 4 def lookup @lookup end |
.store ⇒ Object
Returns the value of attribute store.
4 5 6 |
# File 'lib/kamcaptcha/token.rb', line 4 def store @store end |
Class Method Details
.valid?(validation, input) ⇒ Boolean
6 7 8 9 10 11 |
# File 'lib/kamcaptcha/token.rb', line 6 def valid?(validation, input) input = Kamcaptcha.encrypt(input.to_s.delete(" ").downcase) input = instance_exec(input, &generator) if generator input == validation end |