Class: TestIncludesExtractor
- Defined in:
- lib/ceedling/test_includes_extractor.rb
Instance Method Summary collapse
-
#lookup_includes_list(file) ⇒ Object
includes with file extension.
-
#lookup_raw_mock_list(test) ⇒ Object
mocks with no file extension.
-
#parse_includes_list(includes_list) ⇒ Object
for includes_list file, slurp up array from yaml file and sort & store includes.
-
#parse_test_file(test) ⇒ Object
open, scan for, and sort & store includes of test file.
-
#parse_test_file_source_include(test) ⇒ Object
open, scan for, and sort & store includes of test file.
- #setup ⇒ Object
Instance Method Details
#lookup_includes_list(file) ⇒ Object
includes with file extension
35 36 37 38 39 |
# File 'lib/ceedling/test_includes_extractor.rb', line 35 def lookup_includes_list(file) file_key = form_file_key(file) return [] if (@includes[file_key]).nil? return @includes[file_key] end |
#lookup_raw_mock_list(test) ⇒ Object
mocks with no file extension
28 29 30 31 32 |
# File 'lib/ceedling/test_includes_extractor.rb', line 28 def lookup_raw_mock_list(test) file_key = form_file_key(test) return [] if @mocks[file_key].nil? return @mocks[file_key] end |
#parse_includes_list(includes_list) ⇒ Object
for includes_list file, slurp up array from yaml file and sort & store includes
13 14 15 |
# File 'lib/ceedling/test_includes_extractor.rb', line 13 def parse_includes_list(includes_list) gather_and_store_includes( includes_list, @yaml_wrapper.load(includes_list) ) end |
#parse_test_file(test) ⇒ Object
open, scan for, and sort & store includes of test file
18 19 20 |
# File 'lib/ceedling/test_includes_extractor.rb', line 18 def parse_test_file(test) gather_and_store_includes( test, extract_from_file(test) ) end |
#parse_test_file_source_include(test) ⇒ Object
open, scan for, and sort & store includes of test file
23 24 25 |
# File 'lib/ceedling/test_includes_extractor.rb', line 23 def parse_test_file_source_include(test) return extract_source_include_from_file(test) end |
#setup ⇒ Object
6 7 8 9 |
# File 'lib/ceedling/test_includes_extractor.rb', line 6 def setup @includes = {} @mocks = {} end |