Class: OpenEHR::RM::Common::Generic::PartyIdentified
- Inherits:
-
PartyProxy
- Object
- PartyProxy
- OpenEHR::RM::Common::Generic::PartyIdentified
- Defined in:
- lib/openehr/rm/common/generic.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#identifiers ⇒ Object
Returns the value of attribute identifiers.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from PartyProxy
Instance Method Summary collapse
- #external_ref=(external_ref) ⇒ Object
-
#identifier ⇒ Object
Deprecated: PartyIdentified's identifiers attribute is a List<DV_IDENTIFIER> per spec, so the plural #identifiers is the correct name; these singular aliases exist only for backward compatibility with earlier releases.
- #identifier=(identifier) ⇒ Object
-
#initialize(args = { }) ⇒ PartyIdentified
constructor
A new instance of PartyIdentified.
Constructor Details
#initialize(args = { }) ⇒ PartyIdentified
Returns a new instance of PartyIdentified.
104 105 106 107 108 109 110 111 112 |
# File 'lib/openehr/rm/common/generic.rb', line 104 def initialize(args = { }) identifiers = args[:identifiers] || args[:identifier] if args[:external_ref].nil? && args[:name].nil? && identifiers.nil? raise ArgumentError, 'cannot identified' end self.name = args[:name] self.identifiers = identifiers super(args) end |
Instance Attribute Details
#identifiers ⇒ Object
Returns the value of attribute identifiers.
102 103 104 |
# File 'lib/openehr/rm/common/generic.rb', line 102 def identifiers @identifiers end |
#name ⇒ Object
Returns the value of attribute name.
102 103 104 |
# File 'lib/openehr/rm/common/generic.rb', line 102 def name @name end |
Instance Method Details
#external_ref=(external_ref) ⇒ Object
146 147 148 149 150 151 |
# File 'lib/openehr/rm/common/generic.rb', line 146 def external_ref=(external_ref) if @name.nil? && @identifiers.nil? && external_ref.nil? raise ArgumentError, 'invalid external_ref' end @external_ref = external_ref end |
#identifier ⇒ Object
Deprecated: PartyIdentified's identifiers attribute is a List<DV_IDENTIFIER> per spec, so the plural #identifiers is the correct name; these singular aliases exist only for backward compatibility with earlier releases.
136 137 138 139 |
# File 'lib/openehr/rm/common/generic.rb', line 136 def identifier warn '[DEPRECATED] PartyIdentified#identifier is deprecated; use #identifiers instead' @identifiers end |
#identifier=(identifier) ⇒ Object
141 142 143 144 |
# File 'lib/openehr/rm/common/generic.rb', line 141 def identifier=(identifier) warn '[DEPRECATED] PartyIdentified#identifier= is deprecated; use #identifiers= instead' self.identifiers = identifier end |