Class: JsDuck::BatchParser
- Inherits:
-
Object
- Object
- JsDuck::BatchParser
- Defined in:
- lib/jsduck/batch_parser.rb
Overview
Performs the parsing of all input files. Input files are read from options object (originating from command line).
Instance Attribute Summary collapse
-
#parsed_files ⇒ Object
readonly
Array of Source::File objects.
Instance Method Summary collapse
-
#initialize(opts) ⇒ BatchParser
constructor
A new instance of BatchParser.
-
#run ⇒ Object
Parses the files and returns instance of Relations class.
Constructor Details
#initialize(opts) ⇒ BatchParser
Returns a new instance of BatchParser.
19 20 21 |
# File 'lib/jsduck/batch_parser.rb', line 19 def initialize(opts) @opts = opts end |
Instance Attribute Details
#parsed_files ⇒ Object (readonly)
Array of Source::File objects. Available after calling the #run method.
25 26 27 |
# File 'lib/jsduck/batch_parser.rb', line 25 def parsed_files @parsed_files end |
Instance Method Details
#run ⇒ Object
Parses the files and returns instance of Relations class.
28 29 30 31 32 33 34 |
# File 'lib/jsduck/batch_parser.rb', line 28 def run @parsed_files = parallel_parse(@opts.input_files) result = aggregate(@parsed_files) @relations = filter_classes(result) apply_extra_processing return @relations end |