Class: StageT
Instance Method Summary collapse
-
#run(pTable, pRow, pList) ⇒ Object
range t1-t9…c1-c9.
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…c1-c9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/asker/ai/stages/stage_t.rb', line 10 def run(pTable, pRow, pList) #process_tableXfields questions = [] return questions unless type=="text" if pTable.fields.count>1 then questions = questions + process_table2fields(pTable, pRow, pList, 0, 1) elsif pTable.fields.count>2 then questions = questions + process_table2fields(pTable, pRow, pList, 0, 2) questions = questions + process_table2fields(pTable, pRow, pList, 1, 2) elsif pTable.fields.count>3 then 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 return questions end |