class RelatonUn::EditorialGroup

Attributes

committee[R]

@return [Array<String>]

Public Class Methods

new(committee) click to toggle source

@param committee [Array<String>]

# File lib/relaton_un/editorialgroup.rb, line 9
def initialize(committee)
  @committee = committee
end

Public Instance Methods

presence?() click to toggle source

@return [true]

# File lib/relaton_un/editorialgroup.rb, line 14
def presence?
  true
end
to_asciibib(prefix) click to toggle source

@param prefix [String] @return [String]

# File lib/relaton_un/editorialgroup.rb, line 32
def to_asciibib(prefix)
  pref = prefix.empty? ? prefix : prefix + "."
  pref += "editorialgroup"
  committee.map { |c| "#{pref}.committee:: #{c}\n" }.join
end
to_hash() click to toggle source

@return [Array<Hash>, Hash]

# File lib/relaton_un/editorialgroup.rb, line 26
def to_hash
  single_element_array(committee.map { |c| { "committee" => c } })
end
to_xml(builder) click to toggle source

@param builder [Nokogiri::XML::Builder]

# File lib/relaton_un/editorialgroup.rb, line 19
def to_xml(builder)
  builder.editorialgroup do |b|
    committee.each { |c| b.committee c }
  end
end