class IsoBibItem::Person
Person
class.
Attributes
affiliation[RW]
@return [Array<IsoBibItem::Affilation>]
identifiers[RW]
@return [Array<IsoBibItem::PersonIdentifier>]
name[RW]
@return [IsoBibItem::FullName]
Public Class Methods
new(name:, affiliation: [], contacts:, identifiers: [])
click to toggle source
@param name [IsoBibItem::FullName] @param affiliation [Array<IsoBibItem::Affiliation>]
Calls superclass method
IsoBibItem::Contributor::new
# File lib/iso_bib_item/person.rb, line 95 def initialize(name:, affiliation: [], contacts:, identifiers: []) super(contacts: contacts) @name = name @affiliation = affiliation @identifiers = identifiers end
Public Instance Methods
to_xml(builder)
click to toggle source
@param builder [Nokogiri::XML::Builder]
# File lib/iso_bib_item/person.rb, line 103 def to_xml(builder) builder.person do name.to_xml builder affiliation.each { |a| a.to_xml builder } identifiers.each { |id| id.to_xml builder } contacts.each { |contact| contact.to_xml builder } end end