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