Class: PDD::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- PDD::RakeTask
- Defined in:
- lib/pdd/rake_task.rb
Overview
Rake task
Instance Attribute Summary collapse
-
#fail_on_error ⇒ Object
Returns the value of attribute fail_on_error.
-
#includes ⇒ Object
Returns the value of attribute includes.
-
#license ⇒ Object
Returns the value of attribute license.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quiet ⇒ Object
Returns the value of attribute quiet.
Instance Method Summary collapse
-
#initialize(*args, &task_block) ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize(*args, &task_block) ⇒ RakeTask
Returns a new instance of RakeTask.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pdd/rake_task.rb', line 15 def initialize(*args, &task_block) super() @name = args.shift || :pdd @includes = [] @excludes = [] @license = nil @quiet = false desc 'Run PDD' unless ::Rake.application.last_description task(name, *args) do |_, task_args| RakeFileUtils.send(:verbose, true) do yield(*[self, task_args].slice(0, task_block.arity)) if block_given? end end end |
Instance Attribute Details
#fail_on_error ⇒ Object
Returns the value of attribute fail_on_error.
13 14 15 |
# File 'lib/pdd/rake_task.rb', line 13 def fail_on_error @fail_on_error end |
#includes ⇒ Object
Returns the value of attribute includes.
13 14 15 |
# File 'lib/pdd/rake_task.rb', line 13 def includes @includes end |
#license ⇒ Object
Returns the value of attribute license.
13 14 15 |
# File 'lib/pdd/rake_task.rb', line 13 def license @license end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/pdd/rake_task.rb', line 13 def name @name end |
#quiet ⇒ Object
Returns the value of attribute quiet.
13 14 15 |
# File 'lib/pdd/rake_task.rb', line 13 def quiet @quiet end |