Class: Question
- Inherits:
-
Object
- Object
- Question
- Defined in:
- lib/kita/question.rb
Overview
Question Class
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize ⇒ Question
constructor
A new instance of Question.
- #new_question ⇒ Object
Constructor Details
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/kita/question.rb', line 8 def type @type end |
Instance Method Details
#new_question ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/kita/question.rb', line 15 def new_question question_types = [] question_types.push @hiragana if Settings.hiragana question_types.push @katakana if Settings.katakana question = question_types.sample.question @type = question[:type] question end |