Module: Estella::Searchable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/estella/searchable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#as_indexed_json(_options = {}) ⇒ Object
54 55 56 57 |
# File 'lib/estella/searchable.rb', line 54 def as_indexed_json( = {}) schema = self.class.indexed_json Hash[schema.keys.zip(schema.values.map { |v| v.respond_to?(:call) ? instance_exec(&v) : send(v) })] end |