Sha256: 70e16560fb4a52da5a7e8047133c7356db573a5a26919b291b54e4ed8eb12117

Contents?: true

Size: 475 Bytes

Versions: 21

Compression:

Stored size: 475 Bytes

Contents

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

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

  def ==(comparison_object)
    if comparison_object.respond_to?(:root) && comparison_object.respond_to?(:extension)
      self.root == comparison_object.root && self.extension == comparison_object.extension
    end
  end

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
health-data-standards-3.5.0 lib/health-data-standards/models/cda_identifier.rb