Class: MathCaptcha::Challenge

Inherits:
Object
  • Object
show all
Defined in:
lib/math_captcha.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(question, answer, encrypted, options = nil) ⇒ Challenge

Returns a new instance of Challenge.



12
13
14
15
16
17
# File 'lib/math_captcha.rb', line 12

def initialize(question, answer, encrypted, options=nil)
  @question = question
  @answer = answer
  @encrypted = encrypted
  @options = options
end

Instance Attribute Details

#answerObject

Returns the value of attribute answer.



10
11
12
# File 'lib/math_captcha.rb', line 10

def answer
  @answer
end

#encryptedObject

Returns the value of attribute encrypted.



10
11
12
# File 'lib/math_captcha.rb', line 10

def encrypted
  @encrypted
end

#optionsObject

Returns the value of attribute options.



10
11
12
# File 'lib/math_captcha.rb', line 10

def options
  @options
end

#questionObject

Returns the value of attribute question.



10
11
12
# File 'lib/math_captcha.rb', line 10

def question
  @question
end