Sha256: 6e17cd5c294ec5b47b9fcdfb6634c117b554b39f552e0d12cd7199cdca0037a2

Contents?: true

Size: 928 Bytes

Versions: 57

Compression:

Stored size: 928 Bytes

Contents

module BELParser
  module Resource
    # Value
    module Value

      def dataset
        raise NotImplementedError, "#{__method__} is not implemented."
      end

      def name
        raise NotImplementedError, "#{__method__} is not implemented."
      end

      def identifier
        nil
      end

      def title
        nil
      end

      def synonyms
        []
      end

      def encodings
        raise NotImplementedError, "#{__method__} is not implemented."
      end

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

      def hash
        [dataset, name, encodings].hash
      end

      def ==(another_value)
        return false if another_value == nil
        dataset   == another_value.dataset &&
        name      == another_value.name &&
        encodings == another_value.encodings
      end
      alias :eql? :'=='

      def to_s
        name
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
bel_parser-1.0.0.alpha.56 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.55-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.55 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.54-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.54 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.53-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.53 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.52-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.52 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.51-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.51 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.50-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.50 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.49-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.49 lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.48-java lib/bel_parser/resource/value.rb
bel_parser-1.0.0.alpha.48 lib/bel_parser/resource/value.rb