Sha256: 0e86a066ffc535d47b9a1944367e97e61ac34b134feff7aedc2cc46507e7a628

Contents?: true

Size: 417 Bytes

Versions: 5

Compression:

Stored size: 417 Bytes

Contents

class Predicate
  class Qualifier < Sexpr::Rewriter

    grammar Grammar

    def initialize(qualifier)
      @qualifier = qualifier
    end
    attr_reader :qualifier

    def on_identifier(sexpr)
      return sexpr unless q = qualifier[sexpr.name]
      [:qualified_identifier, q, sexpr.name]
    end

    def on_native(sexpr)
      raise NotSupportedError
    end

    alias :on_missing :copy_and_apply

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
predicate-1.1.3 lib/predicate/processors/qualifier.rb
predicate-1.1.2 lib/predicate/processors/qualifier.rb
predicate-1.1.1 lib/predicate/processors/qualifier.rb
predicate-1.1.0 lib/predicate/processors/qualifier.rb
predicate-1.0.0 lib/predicate/processors/qualifier.rb