Class: Rake::Pipeline::Matcher
- Inherits:
-
Rake::Pipeline
- Object
- Rake::Pipeline
- Rake::Pipeline::Matcher
- Defined in:
- lib/rake-pipeline/matcher.rb
Overview
A Matcher is a type of pipeline that restricts its filters to a particular pattern.
A Matcher’s pattern is a File glob.
For instance, to restrict filters to operating on JavaScript files in the app
directory, the Matcher’s input_root should be “app”, and its glob would be “*.js”.
In general, you should not use Matcher directly. Instead use DSL#match in the block passed to build.
Constant Summary
Constants inherited from Rake::Pipeline
Instance Attribute Summary collapse
-
#glob ⇒ Object
Returns the value of attribute glob.
Attributes inherited from Rake::Pipeline
#filters, #input_files, #input_glob, #input_root, #output_root, #rake_tasks, #tmpdir
Instance Method Summary collapse
-
#output_files ⇒ Array<FileWrapper>
A list of the output files that invoking this pipeline will generate.
Methods inherited from Rake::Pipeline
#add_filters, build, #copy, #initialize, #invoke, #invoke_clean, #rake_application, #rake_application=, #setup
Constructor Details
This class inherits a constructor from Rake::Pipeline
Instance Attribute Details
#glob ⇒ Object
Returns the value of attribute glob.
18 19 20 |
# File 'lib/rake-pipeline/matcher.rb', line 18 def glob @glob end |
Instance Method Details
#output_files ⇒ Array<FileWrapper>
A list of the output files that invoking this pipeline will generate. This will include the outputs of files matching the glob and any inputs that did not match the glob.
This will make those inputs available to any additional filters or matchers.
88 89 90 91 92 |
# File 'lib/rake-pipeline/matcher.rb', line 88 def output_files super + input_files.reject do |file| file.path =~ @pattern end end |