# class Puppet::Parser::AST::Minus

### Attributes

value[RW]

### Public Instance Methods

each() { |value| ... } click to toggle source

    # File lib/puppet/parser/ast/minus.rb, line 10
    def each
      yield @value
    end

evaluate(scope) click to toggle source

    # File lib/puppet/parser/ast/minus.rb, line 14
    def evaluate(scope)
      val = @value.safeevaluate(scope)
      val = Puppet::Parser::Scope.number?(val)
      if val == nil
        raise ArgumentError, "minus operand #{val} is not a number"
      end
      -val
    end