Class: Sunspot::Search::Hit

Inherits:
Object
  • Object
show all
Defined in:
lib/lunr/sunspot.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Hit

Returns a new instance of Hit.



17
18
19
20
21
22
23
# File 'lib/lunr/sunspot.rb', line 17

def initialize *args
  original_initialize(*args)

  if clazz = Sunspot::TypeField.aliases_inverted[@class_name]
    @class_name = clazz.name
  end
end

Instance Method Details

#original_initializeObject



15
# File 'lib/lunr/sunspot.rb', line 15

alias_method :original_initialize, :initialize