Class: Endeca::Refinement
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #attributes ⇒ Object
-
#initialize(raw = {}) ⇒ Refinement
constructor
A new instance of Refinement.
- #inspect ⇒ Object
- #to_endeca_params ⇒ Object
Methods included from ClassToProc
Methods included from Readers
Constructor Details
#initialize(raw = {}) ⇒ Refinement
Returns a new instance of Refinement.
21 22 23 |
# File 'lib/endeca/refinement.rb', line 21 def initialize(raw={}) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
20 21 22 |
# File 'lib/endeca/refinement.rb', line 20 def raw @raw end |
Instance Method Details
#==(other) ⇒ Object
25 26 27 |
# File 'lib/endeca/refinement.rb', line 25 def ==(other) id == other.id end |
#attributes ⇒ Object
33 34 35 |
# File 'lib/endeca/refinement.rb', line 33 def attributes (@raw['Dimensions'] || []).first || {} end |
#inspect ⇒ Object
29 30 31 |
# File 'lib/endeca/refinement.rb', line 29 def inspect "#<#{self.class}=0x#{self.object_id.to_s(16)} id=#{id} name=#{name.inspect}>" end |
#to_endeca_params ⇒ Object
37 38 39 |
# File 'lib/endeca/refinement.rb', line 37 def to_endeca_params expansion_link || contraction_link end |