Sha256: c7cf741e199397d57db196a8995306c820eec7446acfcf9af9d794486af7bc12

Contents?: true

Size: 846 Bytes

Versions: 1

Compression:

Stored size: 846 Bytes

Contents

require "relaton/processor"

module RelatonItu
  class Processor < Relaton::Processor
    def initialize
      @short = :relaton_itu
      @prefix = "ITU"
      @defaultprefix = %r{^ITU\s}
      @idtype = "ITU"
    end

    # @param code [String]
    # @param date [String, NilClass] year
    # @param opts [Hash]
    # @return [RelatonItu::ItuBibliographicItem]
    def get(code, date, opts)
      ::RelatonItu::ItuBibliography.get(code, date, opts)
    end

    # @param xml [String]
    # @return [RelatonItu::ItuBibliographicItem]
    def from_xml(xml)
      ::RelatonItu::XMLParser.from_xml xml
    end

    # @param hash [Hash]
    # @return [RelatonItu::ItuBibliographicItem]
    def hash_to_bib(hash)
      item_hash = ::RelatonItu::HashConverter.hash_to_bib(hash)
      ::RelatonItu::ItuBibliographicItem.new item_hash
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
relaton-itu-0.3.11 lib/relaton_itu/processor.rb