Class: Endeca::Refinement
- Includes:
- Readers
- Defined in:
- lib/endeca/refinement.rb
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 Readers
Constructor Details
#initialize(raw = {}) ⇒ Refinement
20 21 22 |
# File 'lib/endeca/refinement.rb', line 20 def initialize(raw={}) @raw = raw end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
19 20 21 |
# File 'lib/endeca/refinement.rb', line 19 def raw @raw end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 |
# File 'lib/endeca/refinement.rb', line 24 def ==(other) id == other.id end |
#attributes ⇒ Object
32 33 34 |
# File 'lib/endeca/refinement.rb', line 32 def attributes (@raw['Dimensions'] || []).first || {} end |
#inspect ⇒ Object
28 29 30 |
# File 'lib/endeca/refinement.rb', line 28 def inspect "#<#{self.class}=0x#{self.object_id.to_s(16)} id=#{id} name=#{name.inspect}>" end |
#to_endeca_params ⇒ Object
36 37 38 |
# File 'lib/endeca/refinement.rb', line 36 def to_endeca_params expansion_link || contraction_link end |