Class: SolrHit
- Inherits:
-
Delegator
- Object
- Delegator
- SolrHit
- Defined in:
- app/models/solr_hit.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Instance Method Summary collapse
- #__getobj__ ⇒ Object (also: #static_config)
- #__setobj__(obj) ⇒ Object
- #id ⇒ Object
-
#initialize(document) ⇒ SolrHit
constructor
A new instance of SolrHit.
Constructor Details
#initialize(document) ⇒ SolrHit
Returns a new instance of SolrHit.
15 16 17 18 19 |
# File 'app/models/solr_hit.rb', line 15 def initialize(document) document = document.with_indifferent_access super @document = document end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
13 14 15 |
# File 'app/models/solr_hit.rb', line 13 def document @document end |
Instance Method Details
#__getobj__ ⇒ Object Also known as: static_config
3 4 5 |
# File 'app/models/solr_hit.rb', line 3 def __getobj__ @document # return object we are delegating to, required end |
#__setobj__(obj) ⇒ Object
9 10 11 |
# File 'app/models/solr_hit.rb', line 9 def __setobj__(obj) @document = obj end |