Class: Ansible::Ruby::DslBuilders::Args

Inherits:
Base
  • Object
show all
Defined in:
lib/ansible/ruby/dsl_builders/args.rb

Instance Method Summary collapse

Methods inherited from Base

#_result, #jinja, #method_missing, #respond_to_missing?

Constructor Details

#initializeArgs

Returns a new instance of Args.



7
8
9
10
# File 'lib/ansible/ruby/dsl_builders/args.rb', line 7

def initialize
  super
  @result = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ansible::Ruby::DslBuilders::Base

Instance Method Details

#_process_method(id, *args) ⇒ Object



12
13
14
15
# File 'lib/ansible/ruby/dsl_builders/args.rb', line 12

def _process_method(id, *args)
  value = args.length == 1 ? args[0] : args
  @result[id] = value
end