Class: IsoBibItem::Affilation

Inherits:
Object
  • Object
show all
Defined in:
lib/iso_bib_item/contributor.rb

Overview

Affilation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(organization) ⇒ Affilation

Returns a new instance of Affilation.

Parameters:



80
81
82
83
# File 'lib/iso_bib_item/contributor.rb', line 80

def initialize(organization)
  @organization = organization
  @description  = []
end

Instance Attribute Details

#descriptionArray<IsoBibItem::FormattedString> (readonly)



74
75
76
# File 'lib/iso_bib_item/contributor.rb', line 74

def description
  @description
end

#nameIsoBibItem::LocalizedString (readonly)



71
72
73
# File 'lib/iso_bib_item/contributor.rb', line 71

def name
  @name
end

#organizationIsoBibItem::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