iab-Oil 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/Element.rb +1 -23
- metadata +1 -1
data/lib/Element.rb
CHANGED
@@ -8,27 +8,5 @@ class Element
|
|
8
8
|
@parent = parent
|
9
9
|
@fields = []
|
10
10
|
@type = type
|
11
|
-
end
|
12
|
-
|
13
|
-
def info
|
14
|
-
puts "@coverage=#{@coverage},@name=#{@name},@type=#{@type},PARENT=#{parent},CHILDREN=#{offspring}"
|
15
|
-
end
|
16
|
-
|
17
|
-
def succinct_info
|
18
|
-
"@name=#{@name}"
|
19
|
-
end
|
20
|
-
|
21
|
-
def parent
|
22
|
-
return @parent.info if @parent
|
23
|
-
end
|
24
|
-
|
25
|
-
def offspring
|
26
|
-
childrenStr=""
|
27
|
-
if (@children and @children.length > 0)
|
28
|
-
@children.each do |c|
|
29
|
-
childrenStr += "<#{c.succinct_info}>"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
childrenStr
|
33
|
-
end
|
11
|
+
end
|
34
12
|
end
|