Module: Relaton::Bib::FullNameType
- Defined in:
- lib/relaton/bib/model/full_name_type.rb,
lib/relaton/bib/model/full_name_type.rb
Defined Under Namespace
Class Method Summary collapse
-
.included(base) ⇒ Object
rubocop:disable Metrics/AbcSize,Metrics/MethodLength.
Class Method Details
.included(base) ⇒ Object
rubocop:disable Metrics/AbcSize,Metrics/MethodLength
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/relaton/bib/model/full_name_type.rb', line 16 def self.included(base) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength base.instance_eval do attribute :abbreviation, LocalizedString attribute :prefix, LocalizedString, collection: true, initialize_empty: true attribute :forename, Forename, collection: true, initialize_empty: true attribute :formatted_initials, LocalizedString attribute :surname, LocalizedString attribute :addition, LocalizedString, collection: true, initialize_empty: true attribute :completename, LocalizedString attribute :note, Note, collection: true, initialize_empty: true attribute :variant, Variant, collection: true, initialize_empty: true xml do map_element "abbreviation", to: :abbreviation map_element "prefix", to: :prefix map_element "forename", to: :forename map_element "formatted-initials", to: :formatted_initials map_element "surname", to: :surname map_element "addition", to: :addition map_element "completename", to: :completename map_element "note", to: :note map_element "variant", to: :variant end end end |