Class: Relaton::Bsi::Processor
- Inherits:
-
Core::Processor
- Object
- Core::Processor
- Relaton::Bsi::Processor
- Defined in:
- lib/relaton/bsi/processor.rb
Instance Method Summary collapse
- #from_xml(xml) ⇒ Relaton::Bsi::ItemData
- #from_yaml(yaml) ⇒ Relaton::Bsi::ItemData
- #get(code, date, opts) ⇒ Relaton::Bsi::ItemData
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
-
#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) ⇒ Relaton::Bsi::ItemData
23 24 25 26 |
# File 'lib/relaton/bsi/processor.rb', line 23 def from_xml(xml) require_relative "../bsi" ::Relaton::Bsi::Item.from_xml xml end |
#from_yaml(yaml) ⇒ Relaton::Bsi::ItemData
30 31 32 33 |
# File 'lib/relaton/bsi/processor.rb', line 30 def from_yaml(yaml) require_relative "../bsi" ::Relaton::Bsi::Item.from_yaml yaml end |
#get(code, date, opts) ⇒ Relaton::Bsi::ItemData
16 17 18 19 |
# File 'lib/relaton/bsi/processor.rb', line 16 def get(code, date, opts) require_relative "../bsi" ::Relaton::Bsi::Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
37 38 39 40 |
# File 'lib/relaton/bsi/processor.rb', line 37 def grammar_hash require_relative "../bsi" @grammar_hash ||= ::Relaton::Bsi.grammar_hash end |