class RelatonBsi::Processor
Public Class Methods
new()
click to toggle source
# File lib/relaton_bsi/processor.rb, line 5 def initialize @short = :relaton_bsi @prefix = "BSI" @defaultprefix = %r{^(BSI|BS|PD)\s} @idtype = "BSI" end
Public Instance Methods
from_xml(xml)
click to toggle source
@param xml [String] @return [RelatonBsi::BsiBibliographicItem]
# File lib/relaton_bsi/processor.rb, line 22 def from_xml(xml) ::RelatonBsi::XMLParser.from_xml xml end
get(code, date, opts)
click to toggle source
@param code [String] @param date [String, NilClass] year @param opts [Hash] @return [RelatonBsi::BsiBibliographicItem]
# File lib/relaton_bsi/processor.rb, line 16 def get(code, date, opts) ::RelatonBsi::BsiBibliography.get(code, date, opts) end
grammar_hash()
click to toggle source
Returns hash of XML grammar @return [String]
# File lib/relaton_bsi/processor.rb, line 34 def grammar_hash @grammar_hash ||= ::RelatonBsi.grammar_hash end
hash_to_bib(hash)
click to toggle source
@param hash [Hash] @return [RelatonBsi::BsiBibliographicItem]
# File lib/relaton_bsi/processor.rb, line 28 def hash_to_bib(hash) ::RelatonBsi::BsiBibliographicItem.from_hash hash end