Module: Elastics::Result::RailsHelper
- Defined in:
- lib/elastics/result/rails_helper.rb
Defined Under Namespace
Modules: Highlighter
Class Method Summary collapse
-
.extended(result) ⇒ Object
extend the collection on extend.
-
.should_extend?(result) ⇒ Boolean
extend if result is a Search or MultiGet.
Class Method Details
.extended(result) ⇒ Object
extend the collection on extend
42 43 44 |
# File 'lib/elastics/result/rails_helper.rb', line 42 def self.extended(result) result.collection.each { |h| h.extend(Highlighter) } end |
.should_extend?(result) ⇒ Boolean
extend if result is a Search or MultiGet
37 38 39 |
# File 'lib/elastics/result/rails_helper.rb', line 37 def self.should_extend?(result) result.is_a?(Search) || result.is_a?(MultiGet) end |