Sha256: 81201ff402c799a952640d2cfc7f4ef249e3187192e0f99eb5515abe0ec0412b

Contents?: true

Size: 288 Bytes

Versions: 12

Compression:

Stored size: 288 Bytes

Contents

class Code
  class Node
    class NotKeyword < Node
      def initialize(not_keyword)
        @statement = ::Code::Node::Statement.new(not_keyword)
      end

      def evaluate(**args)
        ::Code::Object::Boolean.new(!@statement.evaluate(**args).truthy?)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
template-ruby-0.4.0 lib/code/node/not_keyword.rb
code-ruby-0.4.0 lib/code/node/not_keyword.rb
template-ruby-0.3.1 lib/code/node/not_keyword.rb
code-ruby-0.3.1 lib/code/node/not_keyword.rb
template-ruby-0.3.0 lib/code/node/not_keyword.rb
code-ruby-0.3.0 lib/code/node/not_keyword.rb
code-ruby-0.2.4 lib/code/node/not_keyword.rb
template-ruby-0.2.4 lib/code/node/not_keyword.rb
template-ruby-0.2.3 lib/code/node/not_keyword.rb
template-ruby-0.2.2 lib/code/node/not_keyword.rb
template-ruby-0.2.1 lib/code/node/not_keyword.rb
template-ruby-0.2.0 lib/code/node/not_keyword.rb