Module: Rake::Tasks::DSL Private
- Defined in:
- lib/multi_ar/rake/tasks.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
DSL wrapper partly copied from Rake::DSL.
Class Method Summary collapse
-
.desc(description) ⇒ Object
private
Defines a Rake task’s description (see Rake’s desc() in dsl_definition.rb).
-
.namespace(name = nil, &block) ⇒ Object
private
Defines a Rake namespace (see Rake’s namespace() in dsl_definition.rb).
-
.task(*args, &block) ⇒ Object
private
Defines a Rake task (see Rake’s task() in dsl_definition.rb).
Class Method Details
.desc(description) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines a Rake task’s description (see Rake’s desc() in dsl_definition.rb)
36 37 38 |
# File 'lib/multi_ar/rake/tasks.rb', line 36 def self.desc(description) ::Rake.application.last_description = description end |
.namespace(name = nil, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines a Rake namespace (see Rake’s namespace() in dsl_definition.rb)
26 27 28 29 30 31 32 33 |
# File 'lib/multi_ar/rake/tasks.rb', line 26 def self.namespace(name=nil, &block) name = name.to_s if name.kind_of?(Symbol) name = name.to_str if name.respond_to?(:to_str) unless name.kind_of?(String) || name.nil? raise ArgumentError, "Expected a String or Symbol for a namespace name" end ::Rake.application.in_namespace(name, &block) end |
.task(*args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines a Rake task (see Rake’s task() in dsl_definition.rb)
41 42 43 |
# File 'lib/multi_ar/rake/tasks.rb', line 41 def self.task(*args, &block) ::Rake::Task.define_task(*args, &block) end |