Sha256: c79f074d896ec3933cfd94ef5cdf57416ef3180e08871e389ef67e2b04d258d1

Contents?: true

Size: 713 Bytes

Versions: 2

Compression:

Stored size: 713 Bytes

Contents

require 'puppet'
require 'puppet/parser/ast/branch'
require 'puppet/parser/collector'

# An object that collects stored objects from the central cache and returns
# them to the current host, yo.
class Puppet::Parser::AST
class Collection < AST::Branch
    attr_accessor :type, :query, :form

    # We return an object that does a late-binding evaluation.
    def evaluate(hash)
        scope = hash[:scope]

        if self.query
            str, code = self.query.safeevaluate :scope => scope
        else
            str = code = nil
        end

        newcoll = Puppet::Parser::Collector.new(scope, @type, str, code, self.form)

        scope.compile.add_collection(newcoll)

        newcoll
    end
end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-0.24.0 lib/puppet/parser/ast/collection.rb
puppet-0.24.1 lib/puppet/parser/ast/collection.rb