Class: Relaton::Processor
- Inherits:
-
Object
- Object
- Relaton::Processor
- Defined in:
- lib/relaton/processor.rb
Instance Attribute Summary collapse
- #datasets ⇒ Array<String> readonly
- #defaultprefix ⇒ Regexp readonly
- #idtype ⇒ String readonly
- #prefix ⇒ String readonly
-
#short ⇒ Object
readonly
Returns the value of attribute short.
Instance Method Summary collapse
- #fetch_data(_source, _opts) ⇒ Object
- #from_xml(_xml) ⇒ Object
- #get(_code, _date, _opts) ⇒ Object
- #grammar_hash ⇒ Object
- #hash_to_bib(_hash) ⇒ Object
-
#initialize ⇒ Processor
constructor
A new instance of Processor.
-
#threads ⇒ Integer
Retuns default number of workers.
Constructor Details
#initialize ⇒ Processor
Returns a new instance of Processor.
15 16 17 |
# File 'lib/relaton/processor.rb', line 15 def initialize raise "This is an abstract class!" end |
Instance Attribute Details
#datasets ⇒ Array<String> (readonly)
13 14 15 |
# File 'lib/relaton/processor.rb', line 13 def datasets @datasets end |
#defaultprefix ⇒ Regexp (readonly)
10 11 12 |
# File 'lib/relaton/processor.rb', line 10 def defaultprefix @defaultprefix end |
#idtype ⇒ String (readonly)
7 8 9 |
# File 'lib/relaton/processor.rb', line 7 def idtype @idtype end |
#prefix ⇒ String (readonly)
7 8 9 |
# File 'lib/relaton/processor.rb', line 7 def prefix @prefix end |
#short ⇒ Object (readonly)
Returns the value of attribute short.
4 5 6 |
# File 'lib/relaton/processor.rb', line 4 def short @short end |
Instance Method Details
#fetch_data(_source, _opts) ⇒ Object
23 24 25 |
# File 'lib/relaton/processor.rb', line 23 def fetch_data(_source, _opts) raise "This is an abstract class!" end |
#from_xml(_xml) ⇒ Object
27 28 29 |
# File 'lib/relaton/processor.rb', line 27 def from_xml(_xml) raise "This is an abstract class!" end |
#get(_code, _date, _opts) ⇒ Object
19 20 21 |
# File 'lib/relaton/processor.rb', line 19 def get(_code, _date, _opts) raise "This is an abstract class!" end |
#grammar_hash ⇒ Object
35 36 37 |
# File 'lib/relaton/processor.rb', line 35 def grammar_hash raise "This is an abstract class!" end |
#hash_to_bib(_hash) ⇒ Object
31 32 33 |
# File 'lib/relaton/processor.rb', line 31 def hash_to_bib(_hash) raise "This is an abstract class!" end |
#threads ⇒ Integer
Retuns default number of workers. Should be overraded by childred classes if need.
42 43 44 |
# File 'lib/relaton/processor.rb', line 42 def threads 10 end |