Method: PuppetLint::Configuration#method_missing

Defined in:
lib/puppet-lint/configuration.rb

#method_missing(method, *args, &block) ⇒ Object

Public: Catch situations where options are being set for the first time and create the necessary methods to get & set the option in the future.

args - An Array of values to set the option to. method - The String name of the option. block - Unused.

Returns nothing.

Signature

<option>=(value)


52
53
54
55
56
57
58
59
60
# File 'lib/puppet-lint/configuration.rb', line 52

def method_missing(method, *args, &block)
  if method.to_s =~ /^(\w+)=$/
    option = $1
    add_option(option.to_s) if settings[option].nil?
    settings[option] = args[0]
  else
    nil
  end
end