Class: Invar::Rake::Tasks

Inherits:
Object
  • Object
show all
Includes:
Rake::Cloneable, Rake::DSL
Defined in:
lib/invar/rake/tasks.rb

Overview

RakeTask builder class. Use Tasks.define to generate the needed tasks.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defineObject

Shorthand for Invar::Rake::Tasks.new.define

Parameters:

  • namespace (String)

    The namespace to search for files within

See Also:



28
29
30
# File 'lib/invar/rake/tasks.rb', line 28

def self.define(...)
   new.define(...)
end

Instance Method Details

#define(namespace: nil) ⇒ Object

Defines helpful Rake tasks for the given namespace.

Parameters:

  • namespace (String) (defaults to: nil)

    The namespace to search for files within

Raises:

  • (ArgumentError)


35
36
37
38
39
40
# File 'lib/invar/rake/tasks.rb', line 35

def define(namespace: nil)
   raise ArgumentError, ':namespace keyword argument cannot be nil' if namespace.nil?
   raise ArgumentError, ':namespace keyword argument cannot be empty string' if namespace.empty?

   define_all_tasks(namespace)
end