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, RegisterAllSchemasTask, 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.
15 16 17 18 19 20 21 22 |
# File 'lib/avrolution/rake/base_task.rb', line 15 def initialize(name: nil, dependencies: []) super() @name = name @task_namespace = :avro @dependencies = dependencies yield self if block_given? end |
Instance Attribute Details
#dependencies ⇒ Object
Returns the value of attribute dependencies.
9 10 11 |
# File 'lib/avrolution/rake/base_task.rb', line 9 def dependencies @dependencies end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/avrolution/rake/base_task.rb', line 9 def name @name end |
#task_desc ⇒ Object
Returns the value of attribute task_desc.
9 10 11 |
# File 'lib/avrolution/rake/base_task.rb', line 9 def task_desc @task_desc end |
#task_namespace ⇒ Object
Returns the value of attribute task_namespace.
9 10 11 |
# File 'lib/avrolution/rake/base_task.rb', line 9 def task_namespace @task_namespace end |
Class Method Details
.define(**options, &block) ⇒ Object
11 12 13 |
# File 'lib/avrolution/rake/base_task.rb', line 11 def self.define(**, &block) new(**, &block).define end |
Instance Method Details
#define ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/avrolution/rake/base_task.rb', line 24 def define namespace task_namespace do desc task_desc task(name.to_sym => dependencies) do perform end end end |