Class: Ansible::Ruby::DslBuilders::Tasks
- Defined in:
- lib/ansible/ruby/dsl_builders/tasks.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize ⇒ Tasks
constructor
A new instance of Tasks.
- #process_method(id) ⇒ Object
- #task(name, &block) ⇒ Object
Methods inherited from Base
#method_missing, #respond_to_missing?
Constructor Details
#initialize ⇒ Tasks
Returns a new instance of Tasks.
8 9 10 |
# File 'lib/ansible/ruby/dsl_builders/tasks.rb', line 8 def initialize @tasks = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ansible::Ruby::DslBuilders::Base
Instance Method Details
#evaluate ⇒ Object
17 18 19 20 |
# File 'lib/ansible/ruby/dsl_builders/tasks.rb', line 17 def evaluate(*) super Models::Tasks.new tasks: @tasks end |
#process_method(id) ⇒ Object
22 23 24 |
# File 'lib/ansible/ruby/dsl_builders/tasks.rb', line 22 def process_method(id, *) raise "undefined local variable or method `#{id}'" end |