Top Level Namespace
Defined Under Namespace
Modules: LibDetect
Classes: Docurium
Instance Method Summary
collapse
Instance Method Details
#debug(str = nil) ⇒ Object
7
8
9
|
# File 'lib/docurium/debug.rb', line 7
def debug(str = nil)
puts str if debug_enabled
end
|
#debug_enable ⇒ Object
11
12
13
|
# File 'lib/docurium/debug.rb', line 11
def debug_enable
$debug_stack.push true
end
|
#debug_enabled ⇒ Object
3
4
5
|
# File 'lib/docurium/debug.rb', line 3
def debug_enabled
$debug_stack[-1]
end
|
#debug_pass ⇒ Object
23
24
25
|
# File 'lib/docurium/debug.rb', line 23
def debug_pass
$debug_stack.push debug_enabled
end
|
#debug_restore ⇒ Object
27
28
29
|
# File 'lib/docurium/debug.rb', line 27
def debug_restore
$debug_stack.pop
end
|
#debug_set(val) ⇒ Object
19
20
21
|
# File 'lib/docurium/debug.rb', line 19
def debug_set val
$debug_stack.push val
end
|
#debug_silence ⇒ Object
15
16
17
|
# File 'lib/docurium/debug.rb', line 15
def debug_silence
$debug_stack.push false
end
|
#with_debug(&block) ⇒ Object
#without_debug(&block) ⇒ Object