Class: Puppet::Parser::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/shadow_puppet/test.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object

This allows access to resource options as methods on the resource.



12
13
14
15
16
# File 'lib/shadow_puppet/test.rb', line 12

def method_missing name, *args
  if params.keys.include? name.to_sym
    params[name.to_sym].value
  end
end