Sha256: 9a1187cdcb7dcfb578b80292f94a928539b030d2504601be47b2ab377bf42a6e

Contents?: true

Size: 427 Bytes

Versions: 33

Compression:

Stored size: 427 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

33 entries across 33 versions & 1 rubygems

Version Path
cqm-reports-4.1.3 lib/qrda-import/cda_identifier.rb
cqm-reports-4.1.2 lib/qrda-import/cda_identifier.rb
cqm-reports-4.1.1 lib/qrda-import/cda_identifier.rb
cqm-reports-4.1.0 lib/qrda-import/cda_identifier.rb
cqm-reports-4.0.1 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.10 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.9 lib/qrda-import/cda_identifier.rb
cqm-reports-4.0.0 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.8 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.7 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.6 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.5 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.4 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.3 lib/qrda-import/cda_identifier.rb
cqm-reports-2.1.1 lib/qrda-import/cda_identifier.rb
cqm-reports-2.1.0 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.2 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.1 lib/qrda-import/cda_identifier.rb
cqm-reports-3.1.0 lib/qrda-import/cda_identifier.rb
cqm-reports-3.0.1 lib/qrda-import/cda_identifier.rb