Class: Relaton::Iho::Processor
- Inherits:
-
Core::Processor
- Object
- Core::Processor
- Relaton::Iho::Processor
- Defined in:
- lib/relaton/iho/processor.rb
Instance Attribute Summary collapse
-
#idtype ⇒ Object
readonly
Returns the value of attribute idtype.
Instance Method Summary collapse
- #from_xml(xml) ⇒ Relaton::Iho::ItemData
- #from_yaml(yaml) ⇒ Relaton::Iho::ItemData
- #get(code, date, opts) ⇒ Relaton::Iho::ItemData?
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
-
#remove_index_file ⇒ Object
Remove index file.
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
8 9 10 11 12 13 |
# File 'lib/relaton/iho/processor.rb', line 8 def initialize @short = :relaton_iho @prefix = "IHO" @defaultprefix = %r{^IHO\s} @idtype = "IHO" end |
Instance Attribute Details
#idtype ⇒ Object (readonly)
Returns the value of attribute idtype.
6 7 8 |
# File 'lib/relaton/iho/processor.rb', line 6 def idtype @idtype end |
Instance Method Details
#from_xml(xml) ⇒ Relaton::Iho::ItemData
26 27 28 29 |
# File 'lib/relaton/iho/processor.rb', line 26 def from_xml(xml) require_relative "../iho" Item.from_xml xml end |
#from_yaml(yaml) ⇒ Relaton::Iho::ItemData
33 34 35 36 |
# File 'lib/relaton/iho/processor.rb', line 33 def from_yaml(yaml) require_relative "../iho" Item.from_yaml(yaml) end |
#get(code, date, opts) ⇒ Relaton::Iho::ItemData?
19 20 21 22 |
# File 'lib/relaton/iho/processor.rb', line 19 def get(code, date, opts) require_relative "../iho" Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
40 41 42 43 |
# File 'lib/relaton/iho/processor.rb', line 40 def grammar_hash require_relative "../iho" @grammar_hash ||= ::Relaton::Iho.grammar_hash end |