Sha256: c3389a074fc502431b9a7f2ddcc1db2a0a84624210abf2cefa713266d4cb9405

Contents?: true

Size: 425 Bytes

Versions: 10

Compression:

Stored size: 425 Bytes

Contents

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

# An object that returns a boolean which is the boolean not
# of the given value.
class Puppet::Parser::AST
    class Not < AST::Branch
        attr_accessor :value

        def each
            yield @value
        end

        def evaluate(scope)
            val = @value.safeevaluate(scope)
            return ! Puppet::Parser::Scope.true?(val)
        end
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
puppet-0.25.5 lib/puppet/parser/ast/not.rb
puppet-0.25.4 lib/puppet/parser/ast/not.rb
puppet-0.25.3 lib/puppet/parser/ast/not.rb
puppet-0.24.9 lib/puppet/parser/ast/not.rb
puppet-0.25.2 lib/puppet/parser/ast/not.rb
puppet-0.25.1 lib/puppet/parser/ast/not.rb
puppet-0.25.0 lib/puppet/parser/ast/not.rb
puppet-0.24.6 lib/puppet/parser/ast/not.rb
puppet-0.24.7 lib/puppet/parser/ast/not.rb
puppet-0.24.8 lib/puppet/parser/ast/not.rb