Class: Relaton::Core::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/relaton/core/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProcessor



16
17
18
# File 'lib/relaton/core/processor.rb', line 16

def initialize
  raise "This is an abstract class!"
end

Instance Attribute Details

#datasetsArray<String> (readonly)



14
15
16
# File 'lib/relaton/core/processor.rb', line 14

def datasets
  @datasets
end

#defaultprefixRegexp (readonly)



11
12
13
# File 'lib/relaton/core/processor.rb', line 11

def defaultprefix
  @defaultprefix
end

#idtypeString (readonly)



8
9
10
# File 'lib/relaton/core/processor.rb', line 8

def idtype
  @idtype
end

#prefixString (readonly)



8
9
10
# File 'lib/relaton/core/processor.rb', line 8

def prefix
  @prefix
end

#shortObject (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_hashObject



36
37
38
# File 'lib/relaton/core/processor.rb', line 36

def grammar_hash
  raise "This is an abstract class!"
end

#threadsInteger

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