Class: Avrolution::Rake::BaseTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Avrolution::Rake::BaseTask
- Defined in:
- lib/avrolution/rake/base_task.rb
Direct Known Subclasses
AddCompatibilityBreakTask, CheckCompatibilityTask, RegisterSchemasTask
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
Returns the value of attribute dependencies.
-
#name ⇒ Object
Returns the value of attribute name.
-
#task_desc ⇒ Object
Returns the value of attribute task_desc.
-
#task_namespace ⇒ Object
Returns the value of attribute task_namespace.
Class Method Summary collapse
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name: nil, dependencies: []) {|_self| ... } ⇒ BaseTask
constructor
A new instance of BaseTask.
Constructor Details
#initialize(name: nil, dependencies: []) {|_self| ... } ⇒ BaseTask
Returns a new instance of BaseTask.
13 14 15 16 17 18 19 |
# File 'lib/avrolution/rake/base_task.rb', line 13 def initialize(name: nil, dependencies: []) @name = name @task_namespace = :avro @dependencies = dependencies yield self if block_given? end |
Instance Attribute Details
#dependencies ⇒ Object
Returns the value of attribute dependencies.
7 8 9 |
# File 'lib/avrolution/rake/base_task.rb', line 7 def dependencies @dependencies end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/avrolution/rake/base_task.rb', line 7 def name @name end |
#task_desc ⇒ Object
Returns the value of attribute task_desc.
7 8 9 |
# File 'lib/avrolution/rake/base_task.rb', line 7 def task_desc @task_desc end |
#task_namespace ⇒ Object
Returns the value of attribute task_namespace.
7 8 9 |
# File 'lib/avrolution/rake/base_task.rb', line 7 def task_namespace @task_namespace end |
Class Method Details
.define(**options, &block) ⇒ Object
9 10 11 |
# File 'lib/avrolution/rake/base_task.rb', line 9 def self.define(**, &block) new(**, &block).define end |
Instance Method Details
#define ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/avrolution/rake/base_task.rb', line 21 def define namespace task_namespace do desc task_desc task(name.to_sym => dependencies) do perform end end end |