Class: Relaton::W3c::Processor
- Inherits:
-
Core::Processor
- Object
- Core::Processor
- Relaton::W3c::Processor
- Defined in:
- lib/relaton/w3c/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
8 9 10 11 12 13 14 |
# File 'lib/relaton/w3c/processor.rb', line 8 def initialize # rubocop:disable Lint/MissingSuper @short = :relaton_w3c @prefix = "W3C" @defaultprefix = %r{^W3C\s} @idtype = "W3C" @datasets = %w[w3c-api] end |
Instance Attribute Details
#idtype ⇒ Object (readonly)
Returns the value of attribute idtype.
6 7 8 |
# File 'lib/relaton/w3c/processor.rb', line 6 def idtype @idtype end |
Instance Method Details
#fetch_data(_source, opts) ⇒ Object
21 22 23 24 |
# File 'lib/relaton/w3c/processor.rb', line 21 def fetch_data(_source, opts) require_relative "data_fetcher" DataFetcher.fetch(**opts) end |
#from_xml(xml) ⇒ Object
26 27 28 29 |
# File 'lib/relaton/w3c/processor.rb', line 26 def from_xml(xml) require_relative "../w3c" Item.from_xml(xml) end |
#from_yaml(yaml) ⇒ Object
31 32 33 34 |
# File 'lib/relaton/w3c/processor.rb', line 31 def from_yaml(yaml) require_relative "../w3c" Item.from_yaml(yaml) end |
#get(code, date, opts) ⇒ Object
16 17 18 19 |
# File 'lib/relaton/w3c/processor.rb', line 16 def get(code, date, opts) require_relative "../w3c" Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ Object
36 37 38 39 |
# File 'lib/relaton/w3c/processor.rb', line 36 def grammar_hash require_relative "../w3c" @grammar_hash ||= Relaton::W3c.grammar_hash end |