Class: Relaton::Xsf::Processor
- Inherits:
-
Core::Processor
- Object
- Core::Processor
- Relaton::Xsf::Processor
- Defined in:
- lib/relaton/xsf/processor.rb
Instance Attribute Summary collapse
-
#idtype ⇒ Object
readonly
Returns the value of attribute idtype.
Instance Method Summary collapse
- #fetch_data(_source, opts) ⇒ Object
- #from_xml(xml) ⇒ Object
- #from_yaml(yaml) ⇒ Object
- #get(code, date, opts) ⇒ Object
- #grammar_hash ⇒ Object
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
- #remove_index_file ⇒ Object
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
9 10 11 12 13 14 15 |
# File 'lib/relaton/xsf/processor.rb', line 9 def initialize # rubocop:disable Lint/MissingSuper @short = :relaton_xsf @prefix = "XEP" @defaultprefix = %r{^XEP\s} @idtype = "XEP" @datasets = %w[xep-xmpp] end |
Instance Attribute Details
#idtype ⇒ Object (readonly)
Returns the value of attribute idtype.
7 8 9 |
# File 'lib/relaton/xsf/processor.rb', line 7 def idtype @idtype end |
Instance Method Details
#fetch_data(_source, opts) ⇒ Object
22 23 24 25 |
# File 'lib/relaton/xsf/processor.rb', line 22 def fetch_data(_source, opts) require_relative "data_fetcher" Relaton::Xsf::DataFetcher.fetch(**opts) end |
#from_xml(xml) ⇒ Object
27 28 29 30 |
# File 'lib/relaton/xsf/processor.rb', line 27 def from_xml(xml) require_relative "../xsf" Relaton::Xsf::Item.from_xml(xml) end |
#from_yaml(yaml) ⇒ Object
32 33 34 35 |
# File 'lib/relaton/xsf/processor.rb', line 32 def from_yaml(yaml) require_relative "../xsf" Relaton::Xsf::Item.from_yaml(yaml) end |
#get(code, date, opts) ⇒ Object
17 18 19 20 |
# File 'lib/relaton/xsf/processor.rb', line 17 def get(code, date, opts) require_relative "../xsf" Relaton::Xsf::Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ Object
37 38 39 40 |
# File 'lib/relaton/xsf/processor.rb', line 37 def grammar_hash require_relative "../xsf" Relaton::Xsf.grammar_hash end |