Sha256: 8fc84f29d6f3870bdf0bfe4384ccd69893b9fb34b4e795f3a9557337e01800ca

Contents?: true

Size: 316 Bytes

Versions: 1

Compression:

Stored size: 316 Bytes

Contents

module Indexes
  class Proxy

    def initialize(name, options={}, &block)
      @options = options
      instance_eval &block
      Indexes.add name, @options
    end

    %i(mappings serializer search).each do |name|
      define_method name do |&block|
        @options[name] = block
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
indexes-0.0.1 lib/indexes/proxy.rb