Class: ERB::Linter::Task
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- ERB::Linter::Task
- Defined in:
- lib/erb/linter/task.rb
Instance Attribute Summary collapse
-
#glob ⇒ Object
Returns the value of attribute glob.
-
#name ⇒ Object
Returns the value of attribute name.
-
#root ⇒ Object
Returns the value of attribute root.
-
#tmpdir ⇒ Object
Returns the value of attribute tmpdir.
Instance Method Summary collapse
-
#initialize(*args) {|_self| ... } ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(*args) {|_self| ... } ⇒ Task
Returns a new instance of Task.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/erb/linter/task.rb', line 8 def initialize(*args, &block) @name = args.shift || :erb_linter @glob = "**/*.erb" @root = Dir.pwd @tmpdir = Dir.tmpdir yield self desc 'Check ERB files for HTML correcteness' task(name, *args) do |_, task_args| run end end |
Instance Attribute Details
#glob ⇒ Object
Returns the value of attribute glob.
6 7 8 |
# File 'lib/erb/linter/task.rb', line 6 def glob @glob end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/erb/linter/task.rb', line 6 def name @name end |
#root ⇒ Object
Returns the value of attribute root.
6 7 8 |
# File 'lib/erb/linter/task.rb', line 6 def root @root end |
#tmpdir ⇒ Object
Returns the value of attribute tmpdir.
6 7 8 |
# File 'lib/erb/linter/task.rb', line 6 def tmpdir @tmpdir end |