Class: Relaton::Un::Processor
Instance Attribute Summary collapse
#datasets, #defaultprefix, #prefix, #short
Instance Method Summary
collapse
#fetch_data, #threads
Constructor Details
Returns a new instance of Processor.
10
11
12
13
14
15
|
# File 'lib/relaton/un/processor.rb', line 10
def initialize
@short = :relaton_un
@prefix = "UN"
@defaultprefix = %r{^UN\s}
@idtype = "UN"
end
|
Instance Attribute Details
#idtype ⇒ Object
Returns the value of attribute idtype.
8
9
10
|
# File 'lib/relaton/un/processor.rb', line 8
def idtype
@idtype
end
|
Instance Method Details
#from_xml(xml) ⇒ Object
22
23
24
25
|
# File 'lib/relaton/un/processor.rb', line 22
def from_xml(xml)
require_relative "../un"
Bibdata.from_xml(xml)
end
|
#from_yaml(yaml) ⇒ Object
27
28
29
30
|
# File 'lib/relaton/un/processor.rb', line 27
def from_yaml(yaml)
require_relative "../un"
Item.from_yaml(yaml)
end
|
#get(code, date, opts) ⇒ Object
17
18
19
20
|
# File 'lib/relaton/un/processor.rb', line 17
def get(code, date, opts)
require_relative "../un"
Bibliography.get(code, date, opts)
end
|
#grammar_hash ⇒ Object
32
33
34
35
|
# File 'lib/relaton/un/processor.rb', line 32
def grammar_hash
require_relative "../un"
@grammar_hash ||= Relaton::Un.grammar_hash
end
|