Sha256: c05a35ba4ebd6e769efa32df0cb642929830431653627ce01a8429341216d457

Contents?: true

Size: 700 Bytes

Versions: 7

Compression:

Stored size: 700 Bytes

Contents

module Endeca
  class Dimension
    include Comparable
    include 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_endeca_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
endeca-1.5.3 lib/endeca/dimension.rb
endeca-1.5.2 lib/endeca/dimension.rb
endeca-1.5.1 lib/endeca/dimension.rb
endeca-1.5.0 lib/endeca/dimension.rb
endeca-1.4.2 lib/endeca/dimension.rb
endeca-1.4.1 lib/endeca/dimension.rb
endeca-1.4.0 lib/endeca/dimension.rb