Class: CDAIdentifier

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Attributes::Dynamic, Mongoid::Document
Defined in:
lib/qrda-import/cda_identifier.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/qrda-import/cda_identifier.rb', line 11

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

  root == other.root && extension == other.extension
end

#hashObject



17
18
19
# File 'lib/qrda-import/cda_identifier.rb', line 17

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