Module: Ladder::Searchable::Resource::ClassMethods

Defined in:
lib/ladder/searchable/resource.rb

Instance Method Summary collapse

Instance Method Details

#index_for_search(&block) ⇒ void

This method returns an undefined value.

Specify type of serialization to use for indexing; if a block is provided, it is expected to return a Hash that will be used in lieu of Ladder::Searchable::Resource#as_indexed_json for serializing the resource in the index



24
25
26
# File 'lib/ladder/searchable/resource.rb', line 24

def index_for_search(&block)
  define_method(:serialized_json, block) if block_given?
end