Class: IsoBibItem::IsoProjectGroup

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

Overview

ISO project group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(technical_committee:, **args) ⇒ IsoProjectGroup

Returns a new instance of IsoProjectGroup.

Parameters:



27
28
29
30
31
32
33
34
# File 'lib/iso_bib_item/iso_project_group.rb', line 27

def initialize(technical_committee:, **args)
  @technical_committee = if technical_committee.is_a? Hash
                           IsoSubgroup.new(technical_committee)
                         else technical_committee end
  @subcommittee        = args[:subcommittee]
  @workgroup           = args[:workgroup]
  @secretariat         = args[:secretariat]
end

Instance Attribute Details

#secretariatString (readonly)

Returns:

  • (String)


18
19
20
# File 'lib/iso_bib_item/iso_project_group.rb', line 18

def secretariat
  @secretariat
end

#subcommitteeIsoBibItem::IsoSubgroup (readonly)



12
13
14
# File 'lib/iso_bib_item/iso_project_group.rb', line 12

def subcommittee
  @subcommittee
end

#technical_committeeIsoBibItem::IsoSubgroup (readonly)



9
10
11
# File 'lib/iso_bib_item/iso_project_group.rb', line 9

def technical_committee
  @technical_committee
end

#workgroupIsoBibItem::IsoSubgroup (readonly)



15
16
17
# File 'lib/iso_bib_item/iso_project_group.rb', line 15

def workgroup
  @workgroup
end

Instance Method Details

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


39
40
41
42
43
44
45
46
47
# File 'lib/iso_bib_item/iso_project_group.rb', line 39

def to_xml(builder)
  return unless technical_committee || subcommittee || workgroup || secretariat
  builder.editorialgroup do
    builder.technical_committee { technical_committee.to_xml builder } if technical_committee
    builder.subcommittee { subcommittee.to_xml builder } if subcommittee
    builder.workgroup { workgroup.to_xml builder } if workgroup
    builder.secretariat secretariat if secretariat
  end
end