Sha256: aad21803667fb6a974bcc5291fa132bace1767e33cd722768a7e831b67ad4680

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true

require "faraday"
require "jing"
require "relaton_bib"
require_relative "relaton_iana/version"
require_relative "relaton_iana/iana_bibliographic_item"
require_relative "relaton_iana/xml_parser"
require_relative "relaton_iana/hash_converter"
require_relative "relaton_iana/iana_bibliography"
require_relative "relaton_iana/parser"
require_relative "relaton_iana/data_fetcher"

module RelatonIana
  class Error < StandardError; end

  # Returns hash of XML reammar
  # @return [String]
  def self.grammar_hash
    gem_path = File.expand_path "..", __dir__
    grammars_path = File.join gem_path, "grammars", "*"
    grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
    Digest::MD5.hexdigest grammars
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
relaton-iana-1.14.1 lib/relaton_iana.rb
relaton-iana-1.14.0 lib/relaton_iana.rb