Class: OpenEHR::RM::Common::Generic::PartyIdentified
- Inherits:
-
PartyProxy
- Object
- PartyProxy
- OpenEHR::RM::Common::Generic::PartyIdentified
- Defined in:
- lib/open_ehr/rm/common/generic.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from PartyProxy
Instance Method Summary collapse
- #external_ref=(external_ref) ⇒ Object
-
#initialize(args = { }) ⇒ PartyIdentified
constructor
A new instance of PartyIdentified.
Constructor Details
#initialize(args = { }) ⇒ PartyIdentified
Returns a new instance of PartyIdentified.
106 107 108 109 110 111 112 113 114 |
# File 'lib/open_ehr/rm/common/generic.rb', line 106 def initialize(args = { }) if args[:external_ref].nil? && args[:name].nil? && args[:identifier].nil? raise ArgumentError, 'cannot identified' end self.name = args[:name] self.identifier = args[:identifier] super(args) end |
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
104 105 106 |
# File 'lib/open_ehr/rm/common/generic.rb', line 104 def identifier @identifier end |
#name ⇒ Object
Returns the value of attribute name.
104 105 106 |
# File 'lib/open_ehr/rm/common/generic.rb', line 104 def name @name end |
Instance Method Details
#external_ref=(external_ref) ⇒ Object
134 135 136 137 138 139 |
# File 'lib/open_ehr/rm/common/generic.rb', line 134 def external_ref=(external_ref) if @name.nil? && @identifier.nil? && external_ref.nil? raise ArgumentError, 'invalid external_ref' end @external_ref = external_ref end |