Class: RelatonBsi::Processor
- Inherits:
-
Relaton::Processor
- Object
- Relaton::Processor
- RelatonBsi::Processor
- Defined in:
- lib/relaton_bsi/processor.rb
Instance Method Summary collapse
- #from_xml(xml) ⇒ RelatonBsi::BsiBibliographicItem
- #get(code, date, opts) ⇒ RelatonBsi::BsiBibliographicItem
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
- #hash_to_bib(hash) ⇒ RelatonBsi::BsiBibliographicItem
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
5 6 7 8 9 10 |
# File 'lib/relaton_bsi/processor.rb', line 5 def initialize @short = :relaton_bsi @prefix = "BSI" @defaultprefix = %r{^(BSI|BS|PD)\s} @idtype = "BSI" end |
Instance Method Details
#from_xml(xml) ⇒ RelatonBsi::BsiBibliographicItem
22 23 24 |
# File 'lib/relaton_bsi/processor.rb', line 22 def from_xml(xml) ::RelatonBsi::XMLParser.from_xml xml end |
#get(code, date, opts) ⇒ RelatonBsi::BsiBibliographicItem
16 17 18 |
# File 'lib/relaton_bsi/processor.rb', line 16 def get(code, date, opts) ::RelatonBsi::BsiBibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
34 35 36 |
# File 'lib/relaton_bsi/processor.rb', line 34 def grammar_hash @grammar_hash ||= ::RelatonBsi.grammar_hash end |
#hash_to_bib(hash) ⇒ RelatonBsi::BsiBibliographicItem
28 29 30 |
# File 'lib/relaton_bsi/processor.rb', line 28 def hash_to_bib(hash) ::RelatonBsi::BsiBibliographicItem.from_hash hash end |