Class: ModsDisplay::Name::Person
- Inherits:
-
Object
- Object
- ModsDisplay::Name::Person
- Defined in:
- lib/mods_display/fields/name.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#orcid ⇒ Object
Returns the value of attribute orcid.
Instance Method Summary collapse
-
#initialize(data) ⇒ Person
constructor
A new instance of Person.
- #to_s ⇒ Object
Constructor Details
#initialize(data) ⇒ Person
180 181 182 183 184 185 186 187 |
# File 'lib/mods_display/fields/name.rb', line 180 def initialize(data) @name = data[:name] @orcid = if data[:orcid].present? data[:orcid] elsif data[:name_identifiers].present? orcid_identifier(data[:name_identifiers]) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
178 179 180 |
# File 'lib/mods_display/fields/name.rb', line 178 def name @name end |
#orcid ⇒ Object
Returns the value of attribute orcid.
178 179 180 |
# File 'lib/mods_display/fields/name.rb', line 178 def orcid @orcid end |
Instance Method Details
#to_s ⇒ Object
189 190 191 |
# File 'lib/mods_display/fields/name.rb', line 189 def to_s @name end |