Sha256: 8012fde26fc9979c99dd4d1f27be30d6ebfa6345d1966e9d20a2ecabe136208c
Contents?: true
Size: 830 Bytes
Versions: 26
Compression:
Stored size: 830 Bytes
Contents
module RelatonUn class EditorialGroup include RelatonBib # @return [Array<String>] attr_reader :committee # @param committee [Array<String>] def initialize(committee) @committee = committee end # @return [true] def presence? true 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 # @param prefix [String] # @return [String] def to_asciibib(prefix) pref = prefix.empty? ? prefix : prefix + "." pref += "editorialgroup" committee.map { |c| "#{pref}.committee:: #{c}\n" }.join end end end
Version data entries
26 entries across 26 versions & 1 rubygems