class ThinkingSphinx::Excerpter

Constants

CoreMethods

Public Class Methods

new(search, instance) click to toggle source
# File lib/thinking_sphinx/excerpter.rb, line 12
def initialize(search, instance)
  @search   = search
  @instance = instance
end

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
# File lib/thinking_sphinx/excerpter.rb, line 17
def method_missing(method, *args, &block)
  string = @instance.send(method, *args, &block).to_s
  
  @search.excerpt_for(string, @instance.class)
end