Class: Sunspot::Search::StatRow
- Inherits:
-
Object
- Object
- Sunspot::Search::StatRow
- Defined in:
- lib/search/stat_row.rb
Instance Attribute Summary collapse
-
#all_values ⇒ Object
readonly
Returns the value of attribute all_values.
-
#instance ⇒ Object
Return the instance referenced by this stat row.
-
#stat_field ⇒ Object
readonly
Returns the value of attribute stat_field.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(stat_field, value, all_values, stat) ⇒ StatRow
constructor
:nodoc:.
- #inspect ⇒ Object
Constructor Details
#initialize(stat_field, value, all_values, stat) ⇒ StatRow
:nodoc:
7 8 9 |
# File 'lib/search/stat_row.rb', line 7 def initialize(stat_field, value, all_values, stat) #:nodoc: @stat_field, @value, @all_values, @stat = stat_field, value, all_values, stat end |
Instance Attribute Details
#all_values ⇒ Object (readonly)
Returns the value of attribute all_values.
4 5 6 |
# File 'lib/search/stat_row.rb', line 4 def all_values @all_values end |
#instance ⇒ Object
Return the instance referenced by this stat row. Only valid for field stats whose fields are defined with the :references key.
16 17 18 19 20 21 |
# File 'lib/search/stat_row.rb', line 16 def instance if !defined?(@instance) @stat.populate_instances end @instance end |
#stat_field ⇒ Object (readonly)
Returns the value of attribute stat_field.
4 5 6 |
# File 'lib/search/stat_row.rb', line 4 def stat_field @stat_field end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/search/stat_row.rb', line 4 def value @value end |
Instance Method Details
#inspect ⇒ Object
23 24 25 |
# File 'lib/search/stat_row.rb', line 23 def inspect "<Sunspot::Search::StatRow:#{stat_field.inspect} (#{value} - #{all_values})>" end |