Class: SpecForge::Loader::Filter
- Inherits:
-
Object
- Object
- SpecForge::Loader::Filter
- Defined in:
- lib/spec_forge/loader/filter.rb
Overview
Filters blueprints and steps by path and tags
Applied after step processing to reduce the set of blueprints and steps that will be executed based on CLI options.
Instance Method Summary collapse
-
#initialize(blueprints) ⇒ Filter
constructor
Creates a new filter for the given blueprints.
-
#run(path: nil, tags: [], skip_tags: []) ⇒ Array<Hash>
Applies filters to the blueprints.
Constructor Details
#initialize(blueprints) ⇒ Filter
Creates a new filter for the given blueprints
19 20 21 |
# File 'lib/spec_forge/loader/filter.rb', line 19 def initialize(blueprints) @blueprints = blueprints end |
Instance Method Details
#run(path: nil, tags: [], skip_tags: []) ⇒ Array<Hash>
Applies filters to the blueprints
32 33 34 35 36 37 38 |
# File 'lib/spec_forge/loader/filter.rb', line 32 def run(path: nil, tags: [], skip_tags: []) filter_by_path(path) (, ) remove_empty_blueprints @blueprints end |