class RelatonBipm::EditorialGroup
Attributes
committee[R]
@return [Array<String>]
workgroup[R]
@return [Array<String>]
Public Class Methods
new(committee:, workgroup: [])
click to toggle source
@param committee [Array<RelatonBipm::Committee>] @param workgroup [Array<RelatonBipm::WorkGroup>]
# File lib/relaton_bipm/editorial_group.rb, line 10 def initialize(committee:, workgroup: []) @committee = committee @workgroup = workgroup end
Public Instance Methods
presence?()
click to toggle source
@return [true]
# File lib/relaton_bipm/editorial_group.rb, line 43 def presence? true end
to_asciibib(prefix = "")
click to toggle source
@param prefix [String] @return [String]
# File lib/relaton_bipm/editorial_group.rb, line 25 def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize pref = prefix.empty? ? prefix : "#{prefix}." pref += "editorialgroup" out = "" committee.each { |c| out += c.to_asciibib pref, committee.size } workgroup.each { |w| out += w.to_asciibib pref, workgroup.size } out end
to_hash()
click to toggle source
@return [Hash]
# File lib/relaton_bipm/editorial_group.rb, line 35 def to_hash { "committee" => single_element_array(committee), "workgroup" => single_element_array(workgroup), } end
to_xml(builder)
click to toggle source
@param builder [Nokogiri::XML::Builder]
# File lib/relaton_bipm/editorial_group.rb, line 16 def to_xml(builder) builder.editorialgroup do |b| committee.each { |c| c.to_xml b } workgroup.each { |c| c.to_xml b } end end