Sha256: 757555f2309396a0117b39fb0ee8ddd2ade53464a20f79558cc83273f91b6e97

Contents?: true

Size: 622 Bytes

Versions: 10

Compression:

Stored size: 622 Bytes

Contents

class Predicate
  module Native
    include Expr

    def priority
      90
    end

    def proc
      self[1]
    end

    # overriden because parent relies on free_variables,
    # which raises an exception
    def and_split(attr_list)
      # I possibly make references to those attributes, so
      # I can't be P2
      [ self, tautology ]
    end

    # overriden because parent relies on free_variables,
    # which raises an exception
    def attr_split
      { nil => self }
    end

    def evaluate(tuple)
      proc.call(tuple)
    end

    def free_variables
      raise NotSupportedError
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
predicate-2.4.0 lib/predicate/nodes/native.rb
predicate-2.3.3 lib/predicate/nodes/native.rb
predicate-2.3.2 lib/predicate/nodes/native.rb
predicate-2.3.1 lib/predicate/nodes/native.rb
predicate-2.3.0 lib/predicate/nodes/native.rb
predicate-2.2.1 lib/predicate/nodes/native.rb
predicate-2.2.0 lib/predicate/nodes/native.rb
predicate-2.1.0 lib/predicate/nodes/native.rb
predicate-2.0.1 lib/predicate/nodes/native.rb
predicate-2.0.0 lib/predicate/nodes/native.rb