Sha256: 6361abb3bfe1c24982073da2ad453caa52cbc2b5540220dc89ea2e647afd1ca5

Contents?: true

Size: 742 Bytes

Versions: 17

Compression:

Stored size: 742 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

17 entries across 17 versions & 1 rubygems

Version Path
relaton-ieee-1.11.3 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.11.2 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.11.1 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.11.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.10.2 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.10.1 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.10.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.9.4 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.9.3 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.9.2 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.9.1 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.9.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.8.0 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.7.5 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.7.4 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.7.3 lib/relaton_ieee/hash_converter.rb
relaton-ieee-1.7.2 lib/relaton_ieee/hash_converter.rb