Class: LiquidLint::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- LiquidLint::RakeTask
- Defined in:
- lib/liquid_lint/rake_task.rb
Overview
Rake task interface for liquid-lint command line interface.
You can also specify the list of files as explicit task arguments:
Instance Attribute Summary collapse
-
#config ⇒ String
Configuration file to use.
-
#files ⇒ Array<String>
List of files to lint (can contain shell globs).
-
#name ⇒ String
Name of the task.
-
#quiet ⇒ true, false
Whether output from liquid-lint should not be displayed to the standard out stream.
Instance Method Summary collapse
-
#initialize(name = :liquid_lint) {|_self| ... } ⇒ RakeTask
constructor
Create the task so it exists in the current namespace.
Constructor Details
#initialize(name = :liquid_lint) {|_self| ... } ⇒ RakeTask
Create the task so it exists in the current namespace.
59 60 61 62 63 64 65 66 67 |
# File 'lib/liquid_lint/rake_task.rb', line 59 def initialize(name = :liquid_lint) @name = name @files = ['.'] # Search for everything under current directory by default @quiet = false yield self if block_given? define end |
Instance Attribute Details
#config ⇒ String
Configuration file to use.
42 43 44 |
# File 'lib/liquid_lint/rake_task.rb', line 42 def config @config end |
#files ⇒ Array<String>
List of files to lint (can contain shell globs).
Note that this will be ignored if you explicitly pass a list of files as task arguments via the command line or a task definition.
49 50 51 |
# File 'lib/liquid_lint/rake_task.rb', line 49 def files @files end |
#name ⇒ String
Name of the task.
38 39 40 |
# File 'lib/liquid_lint/rake_task.rb', line 38 def name @name end |
#quiet ⇒ true, false
Whether output from liquid-lint should not be displayed to the standard out stream.
54 55 56 |
# File 'lib/liquid_lint/rake_task.rb', line 54 def quiet @quiet end |