Class: Puppet::Parser::AST::Not

Inherits:
Branch show all
Defined in:
lib/puppet/parser/ast/not.rb

Instance Attribute Summary collapse

Attributes inherited from Branch

#children, #pin

Instance Method Summary collapse

Methods inherited from Branch

#initialize

Constructor Details

This class inherits a constructor from Puppet::Parser::AST::Branch

Instance Attribute Details

#valueObject



8
9
10
# File 'lib/puppet/parser/ast/not.rb', line 8

def value
  @value
end

Instance Method Details

#each {|@value| ... } ⇒ Object

Yields:



10
11
12
# File 'lib/puppet/parser/ast/not.rb', line 10

def each
  yield @value
end

#evaluate(scope) ⇒ Object



14
15
16
17
# File 'lib/puppet/parser/ast/not.rb', line 14

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