Class: ForemanDeployments::StackDefinition
- Inherits:
-
Object
- Object
- ForemanDeployments::StackDefinition
- Defined in:
- app/lib/foreman_deployments/stack_definition.rb
Instance Attribute Summary collapse
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(tasks = {}) ⇒ StackDefinition
constructor
A new instance of StackDefinition.
- #to_hash ⇒ Object
- #validate ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(tasks = {}) ⇒ StackDefinition
Returns a new instance of StackDefinition.
5 6 7 8 |
# File 'app/lib/foreman_deployments/stack_definition.rb', line 5 def initialize(tasks = {}) @tasks = tasks initialize_tasks end |
Instance Attribute Details
#tasks ⇒ Object
Returns the value of attribute tasks.
3 4 5 |
# File 'app/lib/foreman_deployments/stack_definition.rb', line 3 def tasks @tasks end |
Instance Method Details
#accept(visitor) ⇒ Object
10 11 12 13 14 15 |
# File 'app/lib/foreman_deployments/stack_definition.rb', line 10 def accept(visitor) tasks.each do |_task_id, task| task.accept(visitor) end visitor.visit(self) end |
#to_hash ⇒ Object
25 26 27 |
# File 'app/lib/foreman_deployments/stack_definition.rb', line 25 def to_hash tasks end |
#validate ⇒ Object
21 22 23 |
# File 'app/lib/foreman_deployments/stack_definition.rb', line 21 def validate ForemanDeployments::Validation::Validator.validate(self) end |
#validate! ⇒ Object
17 18 19 |
# File 'app/lib/foreman_deployments/stack_definition.rb', line 17 def validate! ForemanDeployments::Validation::Validator.validate!(self) end |