Class: StageT
Overview
StageT create questions based con Table data
Instance Method Summary collapse
-
#run(pTable, pRow, pList) ⇒ Object
range t1-t9.
Methods inherited from BaseStage
Constructor Details
This class inherits a constructor from BaseStage
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BaseStage
Instance Method Details
#run(pTable, pRow, pList) ⇒ Object
range t1-t9
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/asker/ai/stages/stage_t.rb', line 11 def run(pTable, pRow, pList) # process_tableXfields questions = [] return questions unless type == 'text' if pTable.fields.count > 1 questions = questions + process_table2fields(pTable, pRow, pList, 0, 1) elsif pTable.fields.count > 2 questions = questions + process_table2fields(pTable, pRow, pList, 0, 2) # questions = questions + process_table2fields(pTable, pRow, pList, 1, 2) elsif pTable.fields.count > 3 questions = questions + process_table2fields(pTable, pRow, pList, 0, 3) # questions = questions + process_table2fields(pTable, pRow, pList, 1, 3) # questions = questions + process_table2fields(pTable, pRow, pList, 2, 3) end questions end |