Sha256: 424d1ae546bf0dc27c3bd54689450dcf2e3999699f800cf74f82ae1d8cfde6f8

Contents?: true

Size: 715 Bytes

Versions: 7

Compression:

Stored size: 715 Bytes

Contents

module Endeca
  class Dimension
    include Comparable
    extend ClassToProc
    extend Readers

    reader \
      "DimValueName"  => :name,
      "SelectionLink" => :selection_link,
      "RemovalLink"   => :removal_link

    integer_reader \
      "DimValueID"      => :id,
      "NumberofRecords" => :record_count

    attr_reader :raw
    def initialize(raw={})
      @raw=raw
    end
    alias_method :attributes, :raw
    
    def to_params
      selection_link || removal_link
    end

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

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

    def <=>(other)
      name <=> other.name
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primedia-endeca-0.9.16 lib/endeca/dimension.rb
primedia-endeca-0.9.17 lib/endeca/dimension.rb
primedia-endeca-0.9.18 lib/endeca/dimension.rb
primedia-endeca-0.9.19 lib/endeca/dimension.rb
primedia-endeca-0.9.20 lib/endeca/dimension.rb
primedia-endeca-0.9.21 lib/endeca/dimension.rb
primedia-endeca-0.9.22 lib/endeca/dimension.rb