Class: SunQuiz::Question

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prompt, answer) ⇒ Question

Returns a new instance of Question.



6
7
8
9
# File 'lib/sun_quiz.rb', line 6

def initialize prompt, answer
  @prompt = prompt
  @answer = answer
end

Instance Attribute Details

#answerObject

Returns the value of attribute answer.



5
6
7
# File 'lib/sun_quiz.rb', line 5

def answer
  @answer
end

#promptObject

Returns the value of attribute prompt.



5
6
7
# File 'lib/sun_quiz.rb', line 5

def prompt
  @prompt
end