Class: Wizardry::Pages::CheckYourAnswersPage
- Defined in:
- lib/wizardry/pages/check_your_answers_page.rb
Instance Attribute Summary collapse
-
#questions ⇒ Object
readonly
Returns the value of attribute questions.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Attributes inherited from Page
Instance Method Summary collapse
-
#initialize(questions: [], title: 'Check your answers') ⇒ CheckYourAnswersPage
constructor
A new instance of CheckYourAnswersPage.
- #name ⇒ Object
- #question_names ⇒ Object
Methods inherited from Page
#after_update!, #before_edit!, #before_update!, #branch!, #branch?, #next_pages
Constructor Details
#initialize(questions: [], title: 'Check your answers') ⇒ CheckYourAnswersPage
Returns a new instance of CheckYourAnswersPage.
6 7 8 9 10 11 |
# File 'lib/wizardry/pages/check_your_answers_page.rb', line 6 def initialize(questions: [], title: 'Check your answers') @title = title @questions = questions super(pages: []) end |
Instance Attribute Details
#questions ⇒ Object (readonly)
Returns the value of attribute questions.
4 5 6 |
# File 'lib/wizardry/pages/check_your_answers_page.rb', line 4 def questions @questions end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/wizardry/pages/check_your_answers_page.rb', line 4 def title @title end |
Instance Method Details
#name ⇒ Object
13 14 15 |
# File 'lib/wizardry/pages/check_your_answers_page.rb', line 13 def name :check_your_answers end |
#question_names ⇒ Object
17 18 19 |
# File 'lib/wizardry/pages/check_your_answers_page.rb', line 17 def question_names @questions.map(&:name) end |