class PDD::RakeTask

Rake task

Attributes

name[RW]

Public Class Methods

new(*args) { |*[self, task_args].slice(0, arity)| ... } click to toggle source
# File lib/pdd/rake_task.rb, line 9
def initialize(*args, &task_block)
  # @todo #125:30m Needs to have more parameters to run this task.
  #  For now, we just have a single parameter - the name.
  #  Needs more parameters like the xcop rake task has.
  @name = args.shift || :pdd
  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?
      run
    end
  end
end

Public Instance Methods

run() click to toggle source
# File lib/pdd/rake_task.rb, line 23
def run
  # @todo #125:30m need to implement this method.
  #  For now, it's just a task,
  #  that accepts one parameter and throws a system error.
  abort('NOT IMPLEMENTED')
end