diff options
Diffstat (limited to 'lib/puppet/parser/ast/minus.rb')
-rw-r--r-- | lib/puppet/parser/ast/minus.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/puppet/parser/ast/minus.rb b/lib/puppet/parser/ast/minus.rb index 40f64336c..d7a362aa1 100644 --- a/lib/puppet/parser/ast/minus.rb +++ b/lib/puppet/parser/ast/minus.rb @@ -4,20 +4,20 @@ 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 Minus < AST::Branch - attr_accessor :value + class Minus < AST::Branch + attr_accessor :value - def each - yield @value - end + def each + yield @value + end - 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 + 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 + end end |