0f29247c
Isaac Lewis
add comfch and co...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
module Syspro
module BusinessObjects
module Parsers
class ComFchParser
attr_reader :doc
def initialize(doc)
@doc = doc
end
def parse
table_name = doc.first_element_child.name
columns = doc.first_element_child.elements
columns_obj = columns.map { |el|
{ name: el.name, value: el.children.text }
}.compact
FetchObject.new(
table_name,
columns_obj
)
end
FetchObject = Struct.new(:table_name, :columns)
end
end
end
end
|