Sha256: 7bfe019ded749b52f32474fa481fe3c2c3cb72de011c5d1f2fdbd555adfdfccc

Contents?: true

Size: 272 Bytes

Versions: 3

Compression:

Stored size: 272 Bytes

Contents

module Semantic
  class SearchResult
    include Comparable

    attr_reader :document
    attr_reader :score
    def initialize(document, score)
      @document = document
      @score    = score
    end

    def <=>(other)
      @score <=> other.score
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rsemantic-0.2.1 lib/semantic/search_result.rb
rsemantic-0.2.0 lib/semantic/search_result.rb
rsemantic-0.1.4 lib/semantic/search_result.rb