Class: RelatonItu::Processor

Inherits:
Relaton::Processor
  • Object
show all
Defined in:
lib/relaton_itu/processor.rb

Instance Method Summary collapse

Constructor Details

#initializeProcessor



5
6
7
8
9
10
# File 'lib/relaton_itu/processor.rb', line 5

def initialize
  @short = :relaton_itu
  @prefix = "ITU"
  @defaultprefix = %r{^ITU\s}
  @idtype = "ITU"
end

Instance Method Details

#from_xml(xml) ⇒ RelatonItu::ItuBibliographicItem



22
23
24
# File 'lib/relaton_itu/processor.rb', line 22

def from_xml(xml)
  ::RelatonItu::XMLParser.from_xml xml
end

#get(code, date, opts) ⇒ RelatonItu::ItuBibliographicItem



16
17
18
# File 'lib/relaton_itu/processor.rb', line 16

def get(code, date, opts)
  ::RelatonItu::ItuBibliography.get(code, date, opts)
end

#grammar_hashString

Returns hash of XML grammar



34
35
36
# File 'lib/relaton_itu/processor.rb', line 34

def grammar_hash
  @grammar_hash ||= ::RelatonItu.grammar_hash
end

#hash_to_bib(hash) ⇒ RelatonItu::ItuBibliographicItem



28
29
30
# File 'lib/relaton_itu/processor.rb', line 28

def hash_to_bib(hash)
  ::RelatonItu::ItuBibliographicItem.from_hash hash
end