Class: Ansible::Ruby::DslBuilders::Block
- Defined in:
- lib/ansible/ruby/dsl_builders/block.rb
Instance Method Summary collapse
-
#_result ⇒ Object
allow for other attributes besides the module in any order.
-
#initialize ⇒ Block
constructor
A new instance of Block.
- #task(name, &block) ⇒ Object
Methods inherited from Unit
#ansible_when, #become, #become_user, #ignore_errors, #vars
Methods inherited from Base
#jinja, #method_missing, #respond_to_missing?
Constructor Details
#initialize ⇒ Block
Returns a new instance of Block.
10 11 12 13 |
# File 'lib/ansible/ruby/dsl_builders/block.rb', line 10 def initialize super @task_builders = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ansible::Ruby::DslBuilders::Base
Instance Method Details
#_result ⇒ Object
allow for other attributes besides the module in any order
23 24 25 26 27 28 29 30 31 |
# File 'lib/ansible/ruby/dsl_builders/block.rb', line 23 def _result tasks = @task_builders.map(&:_result) args = { tasks: tasks }.merge @task_args block = Models::Block.new args block.validate! block end |