Module: Personable

Included in:
Person, Provider
Defined in:
lib/health-data-standards/models/personable.rb

Class Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/health-data-standards/models/personable.rb', line 3

def self.included(receiver)
  receiver.send(:include, Mongoid::Document)
  
  receiver.field :title       , type: String
  receiver.field :given_name  , type: String
  receiver.field :family_name , type: String

  receiver.embeds_many :addresses, as: :locatable
  receiver.embeds_many :telecoms, as: :contactable
end