iab-Oil 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/DataModelInterpreter.rb +5 -2
- metadata +1 -1
data/lib/DataModelInterpreter.rb
CHANGED
@@ -4,6 +4,7 @@ require 'Element'
|
|
4
4
|
|
5
5
|
class DataModelInterpreter < DslContext
|
6
6
|
def initialize
|
7
|
+
@collections = Hash.new
|
7
8
|
@elements = []
|
8
9
|
@elementTree = []
|
9
10
|
@depth=0
|
@@ -11,7 +12,9 @@ class DataModelInterpreter < DslContext
|
|
11
12
|
|
12
13
|
def getResult
|
13
14
|
#dumpParsedStructure
|
14
|
-
result =
|
15
|
+
result = []
|
16
|
+
result[0] = @elements
|
17
|
+
result[1] = @collections
|
15
18
|
result
|
16
19
|
end
|
17
20
|
# --parse - implement the grammar
|
@@ -50,7 +53,7 @@ class DataModelInterpreter < DslContext
|
|
50
53
|
end
|
51
54
|
|
52
55
|
def collection(*args)
|
53
|
-
|
56
|
+
@collections.merge!(args[0])
|
54
57
|
end
|
55
58
|
|
56
59
|
def element(*args)
|