Class: RelatonCen::Processor
- Inherits:
-
Relaton::Processor
- Object
- Relaton::Processor
- RelatonCen::Processor
- Defined in:
- lib/relaton_cen/processor.rb
Instance Method Summary collapse
- #from_xml(xml) ⇒ RelatonBib::BibliographicItem
- #get(code, date, opts) ⇒ RelatonBib::BibliographicItem
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
- #hash_to_bib(hash) ⇒ RelatonBib::BibliographicItem
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
5 6 7 8 9 10 |
# File 'lib/relaton_cen/processor.rb', line 5 def initialize # rubocop:disable Lint/MissingSuper @short = :relaton_cen @prefix = "CEN" @defaultprefix = %r{^(C?EN|ENV|CWA|HD|CR)[\s/]} @idtype = "CEN" end |
Instance Method Details
#from_xml(xml) ⇒ RelatonBib::BibliographicItem
22 23 24 |
# File 'lib/relaton_cen/processor.rb', line 22 def from_xml(xml) ::RelatonCen::XMLParser.from_xml xml end |
#get(code, date, opts) ⇒ RelatonBib::BibliographicItem
16 17 18 |
# File 'lib/relaton_cen/processor.rb', line 16 def get(code, date, opts) ::RelatonCen::CenBibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
34 35 36 |
# File 'lib/relaton_cen/processor.rb', line 34 def grammar_hash @grammar_hash ||= ::RelatonCen.grammar_hash end |
#hash_to_bib(hash) ⇒ RelatonBib::BibliographicItem
28 29 30 |
# File 'lib/relaton_cen/processor.rb', line 28 def hash_to_bib(hash) ::RelatonCen::BibliographicItem.from_hash hash end |