Sha256: 6508b87b8301ddae9d6fdabd522d33620e56400ca0a2d58935d0510237b76e8d

Contents?: true

Size: 626 Bytes

Versions: 32

Compression:

Stored size: 626 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

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/parser/ast/node.rb
puppet-8.10.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.10.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.10.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.9.0 lib/puppet/parser/ast/node.rb
puppet-8.9.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.9.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.9.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.8.1 lib/puppet/parser/ast/node.rb
puppet-8.8.1-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.8.1-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.8.1-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.7.0 lib/puppet/parser/ast/node.rb
puppet-8.7.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.7.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.7.0-universal-darwin lib/puppet/parser/ast/node.rb
puppet-8.6.0 lib/puppet/parser/ast/node.rb
puppet-8.6.0-x86-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.6.0-x64-mingw32 lib/puppet/parser/ast/node.rb
puppet-8.6.0-universal-darwin lib/puppet/parser/ast/node.rb