Module: Rake::Pipeline::Web::Filters::Helpers
- Defined in:
- lib/rake-pipeline-web-filters/helpers.rb
Overview
Extends the Rake::Pipeline DSL to include shortcuts for adding filters to the pipeline.
Instead of:
match("*.scss") do
filter Rake::Pipeline::Web::Filters::SassCompiler, :syntax => :sass
end
You can do:
match("*.scss") do
sass :syntax => :sass
end
Instance Method Summary collapse
-
#concat(*args, &block) ⇒ Object
If the first argument is an Array, add a new OrderingConcatFilter to the pipeline.
-
#minispade(*args, &block) ⇒ Object
Add a new MinispadeFilter to the pipeline.
-
#sass(*args, &block) ⇒ Object
(also: #scss)
Add a new SassCompiler to the pipeline.
-
#tilt(*args, &block) ⇒ Object
Add a new TiltFilter to the pipeline.
Instance Method Details
#concat(*args, &block) ⇒ Object
If the first argument is an Array, add a new OrderingConcatFilter to the pipeline. Otherwise add a new ConcatFilter.
21 22 23 24 25 26 27 |
# File 'lib/rake-pipeline-web-filters/helpers.rb', line 21 def concat(*args, &block) if args.first.kind_of?(Array) filter(Rake::Pipeline::Web::Filters::OrderingConcatFilter, *args, &block) else filter(Rake::Pipeline::ConcatFilter, *args, &block) end end |
#minispade(*args, &block) ⇒ Object
Add a new MinispadeFilter to the pipeline.
31 32 33 |
# File 'lib/rake-pipeline-web-filters/helpers.rb', line 31 def minispade(*args, &block) filter(Rake::Pipeline::Web::Filters::MinispadeFilter, *args, &block) end |
#sass(*args, &block) ⇒ Object Also known as: scss
Add a new SassCompiler to the pipeline.
37 38 39 |
# File 'lib/rake-pipeline-web-filters/helpers.rb', line 37 def sass(*args, &block) filter(Rake::Pipeline::Web::Filters::SassCompiler, *args, &block) end |
#tilt(*args, &block) ⇒ Object
Add a new TiltFilter to the pipeline.
44 45 46 |
# File 'lib/rake-pipeline-web-filters/helpers.rb', line 44 def tilt(*args, &block) filter(Rake::Pipeline::Web::Filters::TiltFilter, *args, &block) end |