Class: HamlLint::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- HamlLint::RakeTask
- Defined in:
- lib/haml_lint/rake_task.rb
Overview
Rake task interface for haml-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.
-
#fail_level ⇒ String
The severity level above which we should fail the Rake task.
-
#files ⇒ Array<String>
List of files to lint (can contain shell globs).
-
#name ⇒ String
Name of the task.
-
#quiet ⇒ true, false
Whether output from haml-lint should not be displayed to the standard out stream.
Instance Method Summary collapse
-
#initialize(name = :haml_lint) {|_self| ... } ⇒ RakeTask
constructor
Create the task so it exists in the current namespace.
Constructor Details
#initialize(name = :haml_lint) {|_self| ... } ⇒ RakeTask
Create the task so it exists in the current namespace.
67 68 69 70 71 72 73 74 75 |
# File 'lib/haml_lint/rake_task.rb', line 67 def initialize(name = :haml_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.
40 41 42 |
# File 'lib/haml_lint/rake_task.rb', line 40 def config @config end |
#fail_level ⇒ String
The severity level above which we should fail the Rake task.
62 63 64 |
# File 'lib/haml_lint/rake_task.rb', line 62 def fail_level @fail_level 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.
47 48 49 |
# File 'lib/haml_lint/rake_task.rb', line 47 def files @files end |
#name ⇒ String
Name of the task.
36 37 38 |
# File 'lib/haml_lint/rake_task.rb', line 36 def name @name end |
#quiet ⇒ true, false
Whether output from haml-lint should not be displayed to the standard out stream.
52 53 54 |
# File 'lib/haml_lint/rake_task.rb', line 52 def quiet @quiet end |