Class: Ruby::Terraform::Tasks::BaseTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Ruby::Terraform::Tasks::BaseTask
- Defined in:
- lib/ruby/terraform/tasks/base_task.rb
Direct Known Subclasses
AllTasks, ApplyTask, DestroyTask, InitTask, OutputTask, PlanTask, ValidateTask
Instance Attribute Summary collapse
-
#configuration_name ⇒ Object
name of configuration.
-
#deps ⇒ Object
the task dependencies.
-
#description ⇒ Object
the description of the task.
-
#dir ⇒ Object
the working dir of ‘terraform` command.
-
#show_command ⇒ Object
should the terraform command be shown on the console.
-
#show_output ⇒ Object
should the terraform output be shown on the console.
-
#task_name ⇒ Object
name of task.
Instance Method Summary collapse
-
#initialize(configuration_name, task_name = nil) {|_self| ... } ⇒ BaseTask
constructor
A new instance of BaseTask.
Constructor Details
#initialize(configuration_name, task_name = nil) {|_self| ... } ⇒ BaseTask
Returns a new instance of BaseTask.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 28 def initialize(configuration_name, task_name = nil) @configuration_name = configuration_name @task_name = task_name @deps = [] if @task_name.is_a?(Hash) @deps = @task_name.values.first @task_name = @task_name.keys.first end yield self if block_given? define end |
Instance Attribute Details
#configuration_name ⇒ Object
name of configuration
8 9 10 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 8 def configuration_name @configuration_name end |
#deps ⇒ Object
the task dependencies
26 27 28 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 26 def deps @deps end |
#description ⇒ Object
the description of the task
17 18 19 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 17 def description @description end |
#dir ⇒ Object
the working dir of ‘terraform` command
14 15 16 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 14 def dir @dir end |
#show_command ⇒ Object
should the terraform command be shown on the console. Defaults to ‘false`.
20 21 22 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 20 def show_command @show_command end |
#show_output ⇒ Object
should the terraform output be shown on the console. Defaults to ‘false`.
23 24 25 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 23 def show_output @show_output end |
#task_name ⇒ Object
name of task
11 12 13 |
# File 'lib/ruby/terraform/tasks/base_task.rb', line 11 def task_name @task_name end |