Module: RelatonIsoBib

Defined in:
lib/relaton_iso_bib.rb,
lib/relaton_iso_bib/ics.rb,
lib/relaton_iso_bib/version.rb,
lib/relaton_iso_bib/xml_parser.rb,
lib/relaton_iso_bib/hash_converter.rb,
lib/relaton_iso_bib/editorial_group.rb,
lib/relaton_iso_bib/iso_document_relation.rb,
lib/relaton_iso_bib/structured_identifier.rb,
lib/relaton_iso_bib/iso_bibliographic_item.rb

Defined Under Namespace

Classes: EditorialGroup, Error, HashConverter, Ics, IsoBibliographicItem, IsoDocumentRelation, StructuredIdentifier, XMLParser

Constant Summary collapse

VERSION =
"1.10.0".freeze

Class Method Summary collapse

Class Method Details

.grammar_hashString

Returns hash of XML reammar

Returns:

  • (String)


10
11
12
13
14
15
# File 'lib/relaton_iso_bib.rb', line 10

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, encoding: "UTF-8" }.join
  Digest::MD5.hexdigest grammars
end