Class: Ruumba::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Ruumba::RakeTask
- Defined in:
- lib/ruumba/rake_task.rb
Overview
Provides a custom Rake task.
Instance Attribute Summary collapse
-
#dir ⇒ Object
Returns the value of attribute dir.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(*args) { ... } ⇒ RakeTask
constructor
Sets up the custom Rake task.
Constructor Details
#initialize(*args) { ... } ⇒ RakeTask
Sets up the custom Rake task. additional options are included (e.g. dir).
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ruumba/rake_task.rb', line 15 def initialize(*args, &block) @name = args.shift || :ruumba @dir = [] @options = nil desc 'Run RuboCop on ERB files' task(name, *args) do |_, task_args| yield(*[self, task_args].slice(0, block.arity)) if block run end end |
Instance Attribute Details
#dir ⇒ Object
Returns the value of attribute dir.
9 10 11 |
# File 'lib/ruumba/rake_task.rb', line 9 def dir @dir end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/ruumba/rake_task.rb', line 9 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
9 10 11 |
# File 'lib/ruumba/rake_task.rb', line 9 def @options end |