Class: Cwb::FileParser
Instance Method Summary collapse
- #delegate_execution ⇒ Object
-
#initialize(path) ⇒ FileParser
constructor
A new instance of FileParser.
- #validate ⇒ Object
Methods inherited from Parser
#benchmark_suite, #execute, #init_config
Constructor Details
#initialize(path) ⇒ FileParser
Returns a new instance of FileParser.
5 6 7 8 9 |
# File 'lib/cwb/file_parser.rb', line 5 def initialize(path) super(path) init_config(parent_dir) init_config(working_dir) end |
Instance Method Details
#delegate_execution ⇒ Object
11 12 13 14 15 16 |
# File 'lib/cwb/file_parser.rb', line 11 def delegate_execution filename = File.basename(@path, ".rb") class_name = filename.camelize cwb_benchmark = Cwb.const_get(class_name).new(working_dir) benchmark_suite.execute_suite([cwb_benchmark]) end |
#validate ⇒ Object
18 19 20 21 |
# File 'lib/cwb/file_parser.rb', line 18 def validate check_file_exists(@path) require @path end |