Sha256: ac809a4be68652b3a9657e61e00012c36bee4158cb63ca1c88ca674fd2050224

Contents?: true

Size: 625 Bytes

Versions: 20

Compression:

Stored size: 625 Bytes

Contents

# frozen_string_literal: true
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

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/parser/ast/node.rb
puppet-8.3.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.3.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.3.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.3.1 lib/puppet/parser/ast/node.rb
puppet-8.3.1-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.3.1-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.3.1-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.2.0 lib/puppet/parser/ast/node.rb
puppet-8.2.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.2.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.2.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.1.0 lib/puppet/parser/ast/node.rb
puppet-8.1.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.1.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.1.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.0.1 lib/puppet/parser/ast/node.rb
puppet-8.0.1-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.0.1-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.0.1-universal-darwin lib/puppet/parser/ast/node.rb