Class: IsoBibItem::IsoProjectGroup
- Inherits:
-
Object
- Object
- IsoBibItem::IsoProjectGroup
- Defined in:
- lib/iso_bib_item/iso_project_group.rb
Overview
ISO project group.
Instance Attribute Summary collapse
- #secretariat ⇒ String readonly
- #subcommittee ⇒ IsoBibItem::IsoSubgroup readonly
- #technical_committee ⇒ IsoBibItem::IsoSubgroup readonly
- #workgroup ⇒ IsoBibItem::IsoSubgroup readonly
Instance Method Summary collapse
-
#initialize(technical_committee:, **args) ⇒ IsoProjectGroup
constructor
A new instance of IsoProjectGroup.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(technical_committee:, **args) ⇒ IsoProjectGroup
Returns a new instance of IsoProjectGroup.
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
#secretariat ⇒ String (readonly)
18 19 20 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 18 def secretariat @secretariat end |
#subcommittee ⇒ IsoBibItem::IsoSubgroup (readonly)
12 13 14 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 12 def subcommittee @subcommittee end |
#technical_committee ⇒ IsoBibItem::IsoSubgroup (readonly)
9 10 11 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 9 def technical_committee @technical_committee end |
#workgroup ⇒ IsoBibItem::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
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 |