Sha256: b9e85f2a9cf5be5486396168e16a5e4ebf6b32e146ce10d00f9f15a9168ba330

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

module Endeca
  class Refinement
    extend ClassToProc
    extend Readers

    attr_reader :raw
    def initialize(raw={})
      @raw = raw
    end

    def ==(other)
      id == other.id
    end

    def inspect
      "#<#{self.class}=0x#{self.object_id.to_s(16)} id=#{id} name=#{name.inspect}>"
    end

    def attributes
      (@raw['Dimensions'] || []).first || {}
    end

    reader \
      'DimensionName' => :name,
      'ExpansionLink' => :to_params

    integer_reader 'DimensionID' => :id
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primedia-endeca-0.9.0 lib/endeca/refinement.rb
primedia-endeca-0.9.1 lib/endeca/refinement.rb
primedia-endeca-0.9.2 lib/endeca/refinement.rb
primedia-endeca-0.9.3 lib/endeca/refinement.rb
primedia-endeca-0.9.4 lib/endeca/refinement.rb
primedia-endeca-0.9.5 lib/endeca/refinement.rb
primedia-endeca-0.9.6 lib/endeca/refinement.rb