Module: Elasticsearch::Persistence::Repository::ClassMethods
- Defined in:
- lib/elasticsearch/persistence/repository.rb
Overview
Instance Method Summary collapse
-
#create(options = {}, &block) ⇒ Object
Initialize a repository instance.
Instance Method Details
#create(options = {}, &block) ⇒ Object
Initialize a repository instance. Optionally provide a block to define index mappings or
settings on the repository instance.
68 69 70 71 72 |
# File 'lib/elasticsearch/persistence/repository.rb', line 68 def create( = {}, &block) new().tap do |obj| obj.instance_eval(&block) if block_given? end end |