Class: EdifactConverter::DebugHandler
Instance Attribute Summary
Attributes inherited from EmptyHandler
#locator, #next_handler
Instance Method Summary
collapse
#initialize, #method_missing
Instance Method Details
#endDocument ⇒ Object
13
14
15
16
17
18
|
# File 'lib/edifact_converter/debug_handler.rb', line 13
def endDocument
p @level
super
end
|
#endSegment(name) ⇒ Object
38
39
40
41
|
# File 'lib/edifact_converter/debug_handler.rb', line 38
def endSegment(name)
super
end
|
#endSegmentGroup(name) ⇒ Object
26
27
28
29
30
|
# File 'lib/edifact_converter/debug_handler.rb', line 26
def endSegmentGroup(name)
print "End Group #{name}"
@level -= 1
super
end
|
#print(name) ⇒ Object
43
44
45
46
|
# File 'lib/edifact_converter/debug_handler.rb', line 43
def print(name)
text = " #{@level} - #{name}"
puts text
end
|
#startDocument ⇒ Object
7
8
9
10
11
|
# File 'lib/edifact_converter/debug_handler.rb', line 7
def startDocument
@level = 1
print 'Edifact'
super
end
|
#startSegment(name, position = nil) ⇒ Object
32
33
34
35
36
|
# File 'lib/edifact_converter/debug_handler.rb', line 32
def startSegment(name, position = nil)
print "#{name} #{position}"
super
end
|
#startSegmentGroup(name, position = nil, hidden = false) ⇒ Object
20
21
22
23
24
|
# File 'lib/edifact_converter/debug_handler.rb', line 20
def startSegmentGroup(name, position = nil, hidden = false)
@level += 1
print "Start Group #{name} #{position}"
super
end
|