Sha256: b90428bb6c37936f9a41bcd44610127d49511a94337819fa50ab809052c9039d

Contents?: true

Size: 738 Bytes

Versions: 12

Compression:

Stored size: 738 Bytes

Contents

module RelatonIeee
  class HashConverter < RelatonBib::HashConverter
    class << self
      # @param args [Hash]
      # @param neated [TrueClas, FalseClass] default true
      # @return [Hash]
      def hash_to_bib(args, nested = false)
        hash = super
        return nil unless hash.is_a?(Hash)

        committee_hash_to_bib hash
        hash
      end

      # @param item_hash [Hash]
      # @return [RelatonIeee::IeeeBibliographicItem]
      def bib_item(item_hash)
        IeeeBibliographicItem.new item_hash
      end

      # @param hash [Hash]
      def committee_hash_to_bib(hash)
        return unless hash[:committee]

        hash[:committee] = hash[:committee].map { |c| Committee.new c }
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
relaton-ieee-1.7.1 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.7.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.6.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.6.pre1 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.5.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.5.pre lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.4.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.3.0 lib/relaton_ieee/hash_converter.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/relaton-ieee-1.2.0/lib/relaton_ieee/hash_converter.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/relaton-ieee-1.2.0/lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.2.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.1.0 lib/relaton_ieee/hash_converter.rb