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.



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

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.



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

def answer
  @answer
end

#encryptedObject

Returns the value of attribute encrypted.



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

def encrypted
  @encrypted
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#questionObject

Returns the value of attribute question.



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

def question
  @question
end