Sha256: a1ab15b3ef6e0154fe5e2740bdbc0defb8934d733eba287d82f47d822b1579f1

Contents?: true

Size: 538 Bytes

Versions: 8

Compression:

Stored size: 538 Bytes

Contents

module RelatonUn
  class EditorialGroup
    include RelatonBib

    # @return [Array<String>]
    attr_reader :committee

    # @param committee [Array<String>]
    def initialize(committee)
      @committee = committee
    end

    # @param builder [Nokogiri::XML::Builder]
    def to_xml(builder)
      builder.editorialgroup do |b|
        committee.each { |c| b.committee c }
      end
    end

    # @return [Array<Hash>, Hash]
    def to_hash
      single_element_array(committee.map { |c| { "committee" => c } })
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/relaton-un-1.2.1/lib/relaton_un/editorialgroup.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/relaton-un-1.2.1/lib/relaton_un/editorialgroup.rb
relaton-un-1.2.1 lib/relaton_un/editorialgroup.rb
relaton-un-1.2.0 lib/relaton_un/editorialgroup.rb
relaton-un-1.1.0 lib/relaton_un/editorialgroup.rb
relaton-un-1.0.1 lib/relaton_un/editorialgroup.rb
relaton-un-1.0.0 lib/relaton_un/editorialgroup.rb
relaton-un-0.2.1 lib/relaton_un/editorialgroup.rb