Sha256: 223bdf3490bb83717cc67dd7d1c5e30bcbd9f88c4955ac3a532f748c3be5bf67

Contents?: true

Size: 595 Bytes

Versions: 474

Compression:

Stored size: 595 Bytes

Contents

class Puppet::Parser::AST::Node < Puppet::Parser::AST::TopLevelConstruct
  attr_accessor :names, :context

  def initialize(names, context = {})
    raise ArgumentError, _("names should be an array") unless names.is_a? Array
    if context[:parent]
      raise Puppet::DevError, _("Node inheritance is removed in Puppet 4.0.0. See http://links.puppet.com/puppet-node-inheritance-deprecation")
    end

    @names = names
    @context = context
  end

  def instantiate(modname)
    @names.map { |name| Puppet::Resource::Type.new(:node, name, @context.merge(:module_name => modname)) }
  end
end

Version data entries

474 entries across 474 versions & 2 rubygems

Version Path
puppet-7.34.0 lib/puppet/parser/ast/node.rb
puppet-7.34.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.34.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.34.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-7.33.0 lib/puppet/parser/ast/node.rb
puppet-7.33.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.33.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.33.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-7.32.1 lib/puppet/parser/ast/node.rb
puppet-7.32.1-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.32.1-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.32.1-universal-darwin lib/puppet/parser/ast/node.rb
puppet-7.31.0 lib/puppet/parser/ast/node.rb
puppet-7.31.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.31.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.31.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-7.30.0 lib/puppet/parser/ast/node.rb
puppet-7.30.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.30.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-7.30.0-universal-darwin lib/puppet/parser/ast/node.rb