Sha256: a0154595170d50fc30863af917094a13b3ba74048290cc93f6121ef7cc3123ab

Contents?: true

Size: 519 Bytes

Versions: 10

Compression:

Stored size: 519 Bytes

Contents

module Minidusen
  module Filter
    module ClassMethods

      private

      attr_accessor :minidusen_syntax

      def filter(field, &block)
        minidusen_syntax.learn_field(field, &block)
      end

    end

    def self.included(base)
      base.extend(ClassMethods)
      base.send(:minidusen_syntax=, Syntax.new)
    end

    def filter(scope, query)
      minidusen_syntax.search(self, scope, query)
    end

    private

    def minidusen_syntax
      self.class.send(:minidusen_syntax)
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
minidusen-0.11.2 lib/minidusen/filter.rb
minidusen-0.11.1 lib/minidusen/filter.rb
minidusen-0.11.0 lib/minidusen/filter.rb
minidusen-0.10.1 lib/minidusen/filter.rb
minidusen-0.10 lib/minidusen/filter.rb
minidusen-0.9 lib/minidusen/filter.rb
minidusen-0.8.3 lib/minidusen/filter.rb
minidusen-0.8.2 lib/minidusen/filter.rb
minidusen-0.8.1 lib/minidusen/filter.rb
minidusen-0.8.0 lib/minidusen/filter.rb