Class: RelatonIetf::Processor
- Inherits:
-
Relaton::Processor
- Object
- Relaton::Processor
- RelatonIetf::Processor
- Defined in:
- lib/relaton_ietf/processor.rb
Instance Method Summary collapse
- #from_xml(xml) ⇒ RelatonIetf::IetfBibliographicItem
- #get(code, date, opts) ⇒ RelatonIetf::IetfBibliographicItem
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
- #hash_to_bib(hash) ⇒ RelatonIetf::IetfBibliographicItem
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
6 7 8 9 10 11 |
# File 'lib/relaton_ietf/processor.rb', line 6 def initialize @short = :relaton_ietf @prefix = "IETF" @defaultprefix = /^RFC / @idtype = "IETF" end |
Instance Method Details
#from_xml(xml) ⇒ RelatonIetf::IetfBibliographicItem
23 24 25 |
# File 'lib/relaton_ietf/processor.rb', line 23 def from_xml(xml) ::RelatonIetf::XMLParser.from_xml xml end |
#get(code, date, opts) ⇒ RelatonIetf::IetfBibliographicItem
17 18 19 |
# File 'lib/relaton_ietf/processor.rb', line 17 def get(code, date, opts) ::RelatonIetf::IetfBibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
35 36 37 |
# File 'lib/relaton_ietf/processor.rb', line 35 def grammar_hash @grammar_hash ||= ::RelatonIetf.grammar_hash end |
#hash_to_bib(hash) ⇒ RelatonIetf::IetfBibliographicItem
29 30 31 |
# File 'lib/relaton_ietf/processor.rb', line 29 def hash_to_bib(hash) ::RelatonIetf::IetfBibliographicItem.from_hash hash end |