Class: Relaton::Cen::Processor
- Inherits:
-
Relaton::Core::Processor
- Object
- Relaton::Core::Processor
- Relaton::Cen::Processor
- Defined in:
- lib/relaton/cen/processor.rb
Instance Method Summary collapse
- #from_xml(xml) ⇒ RelatonBib::BibliographicItem
- #from_yaml(yaml) ⇒ RelatonBib::BibliographicItem
- #get(code, date, opts) ⇒ RelatonBib::BibliographicItem
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
6 7 8 9 10 11 |
# File 'lib/relaton/cen/processor.rb', line 6 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
23 24 25 |
# File 'lib/relaton/cen/processor.rb', line 23 def from_xml(xml) Item.from_xml xml end |
#from_yaml(yaml) ⇒ RelatonBib::BibliographicItem
29 30 31 |
# File 'lib/relaton/cen/processor.rb', line 29 def from_yaml(yaml) Item.from_yaml yaml end |
#get(code, date, opts) ⇒ RelatonBib::BibliographicItem
17 18 19 |
# File 'lib/relaton/cen/processor.rb', line 17 def get(code, date, opts) Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
35 36 37 |
# File 'lib/relaton/cen/processor.rb', line 35 def grammar_hash @grammar_hash ||= Cen.grammar_hash end |