Class: QuickExam::Analyst::BaseDocx
- Defined in:
- lib/quick_exam/analyst/base_docx.rb
Constant Summary
Constants included from Format
Format::ALLOWED_ELEMENTS, Format::CORRECT_MARK, Format::FOLDER_NAME_EXPORT, Format::QUESTION_MARK
Instance Attribute Summary collapse
-
#records ⇒ Object
readonly
Returns the value of attribute records.
-
#total_line ⇒ Object
readonly
Returns the value of attribute total_line.
Instance Method Summary collapse
- #analyze ⇒ Object
-
#initialize(file_path, f_ques: '', f_corr: '') ⇒ BaseDocx
constructor
A new instance of BaseDocx.
Methods included from Common
#answer, #answer?, #clean_object, #collect_object_ticket, #correct_answer?, #end_of_line?, #end_of_one_ticket_for_next_question?, #get_answer, #get_correct_indexes_answer, #get_question, #question, #question?, #regex_answer_mark, #regex_answer_sentence, #regex_question_mark, #reset_object_ticket, #rid_non_ascii!
Methods included from Format
Constructor Details
#initialize(file_path, f_ques: '', f_corr: '') ⇒ BaseDocx
Returns a new instance of BaseDocx.
13 14 15 16 17 18 19 |
# File 'lib/quick_exam/analyst/base_docx.rb', line 13 def initialize(file_path, f_ques:'' , f_corr:'') raise ErrorAnalyze.new('No such file') unless File.exist? file_path @file_path = file_path @f_ques = f_ques @f_corr = f_corr @records = QuickExam::RecordCollection.new() end |
Instance Attribute Details
#records ⇒ Object (readonly)
Returns the value of attribute records.
11 12 13 |
# File 'lib/quick_exam/analyst/base_docx.rb', line 11 def records @records end |
#total_line ⇒ Object (readonly)
Returns the value of attribute total_line.
11 12 13 |
# File 'lib/quick_exam/analyst/base_docx.rb', line 11 def total_line @total_line end |
Instance Method Details
#analyze ⇒ Object
21 22 23 24 25 26 |
# File 'lib/quick_exam/analyst/base_docx.rb', line 21 def analyze data_standardize self rescue => e raise ErrorAnalyze.new('Data can not analyze') end |