Method: Puppet::Type.newparam
- Defined in:
- lib/puppet/type.rb
.newparam(name, options = {}) {|| ... } ⇒ Class<inherits Puppet::Parameter>
Creates a new parameter.
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/puppet/type.rb', line 456 def self.newparam(name, = {}, &block) [:attributes] ||= {} param = genclass( name, :parent => [:parent] || Puppet::Parameter, :attributes => [:attributes], :block => block, :prefix => "Parameter", :array => @parameters, :hash => @paramhash ) (name, ) # Grr. param.required_features = [:required_features] if [:required_features] param.isnamevar if [:namevar] param end |