Class: Asker
- Inherits:
-
Object
- Object
- Asker
- Defined in:
- lib/asker.rb
Overview
This class does all the job
-
start
-
load_input_data
-
create_output_files, show_create_output_files
-
create_questions
-
show_final_results
Class Method Summary collapse
-
.check(filepath) ⇒ Object
Checking input file syntax.
-
.create_skeleton(dirpath) ⇒ Object
Create asker input demo files.
Instance Method Summary collapse
-
#create_output_files ⇒ Object
Create output files * Gift * YAML * TXT Doc.
-
#initialize ⇒ Asker
constructor
Initialize atributes.
-
#load_input_data(args) ⇒ Object
Load input data.
-
#start(args = {}) ⇒ Object
Start working.
Constructor Details
#initialize ⇒ Asker
Initialize atributes
24 25 26 27 28 |
# File 'lib/asker.rb', line 24 def initialize @concepts_ai = [] @concepts = [] @codes = [] end |
Class Method Details
Instance Method Details
#create_output_files ⇒ Object
Create output files
-
Gift
-
YAML
-
TXT Doc
58 59 60 61 62 |
# File 'lib/asker.rb', line 58 def create_output_files show_create_output_files create_questions ConceptDocExporter.new(@concepts).export end |
#load_input_data(args) ⇒ Object
Load input data
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/asker.rb', line 42 def load_input_data(args) ProjectLoader.load(args) Project.instance.open data = InputLoader.load(Project.instance.get(:inputdirs).split(',')) @concepts = data[:concepts] @codes = data[:codes] Project.instance.verbose "\n[INFO] Loading data from Internet" @world = World.new(@concepts) ConceptScreenExporter.export_all(@concepts) end |
#start(args = {}) ⇒ Object
Start working
33 34 35 36 37 |
# File 'lib/asker.rb', line 33 def start(args = {}) load_input_data(args) create_output_files show_final_results end |