Class: IsoBibItem::Affilation
- Inherits:
-
Object
- Object
- IsoBibItem::Affilation
- Defined in:
- lib/iso_bib_item/contributor.rb
Overview
Affilation.
Instance Attribute Summary collapse
- #description ⇒ Array<IsoBibItem::FormattedString> readonly
- #name ⇒ IsoBibItem::LocalizedString readonly
- #organization ⇒ IsoBibItem::Organization readonly
Instance Method Summary collapse
-
#initialize(organization) ⇒ Affilation
constructor
A new instance of Affilation.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(organization) ⇒ Affilation
Returns a new instance of Affilation.
80 81 82 83 |
# File 'lib/iso_bib_item/contributor.rb', line 80 def initialize(organization) @organization = organization @description = [] end |
Instance Attribute Details
#description ⇒ Array<IsoBibItem::FormattedString> (readonly)
74 75 76 |
# File 'lib/iso_bib_item/contributor.rb', line 74 def description @description end |
#name ⇒ IsoBibItem::LocalizedString (readonly)
71 72 73 |
# File 'lib/iso_bib_item/contributor.rb', line 71 def name @name end |
#organization ⇒ IsoBibItem::Organization (readonly)
77 78 79 |
# File 'lib/iso_bib_item/contributor.rb', line 77 def organization @organization end |
Instance Method Details
#to_xml(builder) ⇒ Object
86 87 88 89 90 91 92 |
# File 'lib/iso_bib_item/contributor.rb', line 86 def to_xml(builder) builder.affiliation do builder.name { name.to_xml builder } if name description.each { |d| builder.description { d.to_xml builder } } organization.to_xml builder end end |