lib/code/node/boolean.rb in template-ruby-0.4.0 vs lib/code/node/boolean.rb in template-ruby-0.5.0

- old
+ new

@@ -1,21 +1,21 @@ class Code class Node class Boolean < Node - TRUE = "true" - FALSE = "false" + TRUE_KEYWORD = "true" + FALSE_KEYWORD = "false" - def initialize(boolean) - @boolean = boolean + def initialize(parsed) + @boolean = parsed end def evaluate(**args) - if @boolean == TRUE + if @boolean == TRUE_KEYWORD ::Code::Object::Boolean.new(true) - elsif @boolean == FALSE + elsif @boolean == FALSE_KEYWORD ::Code::Object::Boolean.new(false) else - raise NotImplementedError, @boolean.inspect + raise NotImplementedError.new(@boolean) end end end end end