Class: Ansible::Ruby::DslBuilders::Base
- Inherits:
-
Object
- Object
- Ansible::Ruby::DslBuilders::Base
- Defined in:
- lib/ansible/ruby/dsl_builders/base.rb
Direct Known Subclasses
Args, FileLevel, ModuleCall, Tasks, Unit
Instance Method Summary collapse
- #_result ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #jinja(text) ⇒ Object
-
#method_missing(id, *args, &block) ⇒ Object
For the DSL, don’t want to defer to regular method_missing.
- #respond_to_missing? ⇒ Boolean
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/ansible/ruby/dsl_builders/base.rb', line 9 def initialize @result = nil end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args, &block) ⇒ Object
For the DSL, don’t want to defer to regular method_missing
26 27 28 29 |
# File 'lib/ansible/ruby/dsl_builders/base.rb', line 26 def method_missing(id, *args, &block) result = _process_method id, *args, &block method_missing_return id, result, *args end |
Instance Method Details
#_result ⇒ Object
13 14 15 |
# File 'lib/ansible/ruby/dsl_builders/base.rb', line 13 def _result @result end |
#jinja(text) ⇒ Object
21 22 23 |
# File 'lib/ansible/ruby/dsl_builders/base.rb', line 21 def jinja(text) Ansible::Ruby::Models::JinjaExpression.new(text) end |
#respond_to_missing? ⇒ Boolean
17 18 19 |
# File 'lib/ansible/ruby/dsl_builders/base.rb', line 17 def respond_to_missing?(*) super end |