Module: CukeSlicer::ExtractionHelpers
- Includes:
- FilterHelpers
- Included in:
- FileExtractor
- Defined in:
- lib/cuke_slicer/helpers/extraction_helpers.rb
Overview
private
Instance Method Summary collapse
-
#extract_runnable_block_elements(things, filters, &block) ⇒ Object
private.
-
#extract_runnable_elements(things) ⇒ Object
private.
Methods included from FilterHelpers
#apply_custom_filter, #filter_excluded_paths, #filter_excluded_tags, #filter_included_paths, #filter_included_tags
Methods included from MatchingHelpers
#and_filter_match, #filter_match, #matching_path?, #matching_tag?, #or_filter_match
Instance Method Details
#extract_runnable_block_elements(things, filters, &block) ⇒ Object
private
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/cuke_slicer/helpers/extraction_helpers.rb', line 15 def extract_runnable_block_elements(things, filters, &block) [].tap do |elements| things.each do |thing| if thing.is_a?(CukeModeler::Outline) elements.concat(thing.examples) else elements << thing end end filter_excluded_paths(elements, filters[:excluded_paths]) filter_included_paths(elements, filters[:included_paths]) (elements, filters[:excluded_tags]) (elements, filters[:included_tags]) apply_custom_filter(elements, &block) end end |
#extract_runnable_elements(things) ⇒ Object
private
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/cuke_slicer/helpers/extraction_helpers.rb', line 35 def extract_runnable_elements(things) [].tap do |elements| things.each do |thing| if thing.is_a?(CukeModeler::Example) # Slicing in order to remove the parameter row element elements.concat(thing.rows.slice(1, thing.rows.count)) else elements << thing end end end end |