Sha256: e6dc10a8751f59bb1f9b0d0788d8d487da3b5e8af08c08e78bcaa794cf2834d7

Contents?: true

Size: 426 Bytes

Versions: 6

Compression:

Stored size: 426 Bytes

Contents

require 'mongoid'

class CDAIdentifier
  include Mongoid::Document
  include Mongoid::Attributes::Dynamic

  field :root, type: String
  field :extension, type: String
  embedded_in :cda_identifiable, polymorphic: true

  def ==(other)
    return unless other.respond_to?(:root) && other.respond_to?(:extension)
    root == other.root && extension == other.extension
  end

  def hash
    "#{root}#{extension}".hash
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cqm-parsers-0.2.4 lib/qrda-import/cda_identifier.rb
cqm-parsers-0.2.3 lib/qrda-import/cda_identifier.rb
cqm-parsers-0.2.2 lib/qrda-import/cda_identifier.rb
cqm-parsers-0.2.1 lib/qrda-import/cda_identifier.rb
cqm-parsers-0.1.1 lib/qrda-import/cda_identifier.rb
cqm-parsers-0.1.0 lib/qrda-import/cda_identifier.rb