Module: SourceRoute
- Extended by:
- SourceRoute
- Included in:
- SourceRoute
- Defined in:
- lib/source_route.rb,
lib/source_route.rb,
lib/source_route/version.rb,
lib/source_route/wrapper.rb,
lib/source_route/tp_filter.rb,
lib/source_route/formats/html.rb,
lib/source_route/generate_result.rb,
lib/source_route/tp_result_chain.rb
Defined Under Namespace
Modules: Formats
Classes: GenerateResult, Logger, TpFilter, TpResultChain, Wrapper
Constant Summary
collapse
- VERSION =
"0.1.3"
Instance Method Summary
collapse
Instance Method Details
#build_html_output ⇒ Object
#disable ⇒ Object
26
27
28
|
# File 'lib/source_route.rb', line 26
def disable
wrapper.tp.disable
end
|
#enable(match = nil, &block) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/source_route.rb', line 30
def enable(match = nil, &block)
wrapper.reset
if match
wrapper.condition.method_id(match)
wrapper.condition.defined_class(match)
end
wrapper.condition.instance_eval(&block) if block_given?
wrapper.trace
end
|
#output_html ⇒ Object
62
63
64
|
# File 'lib/source_route.rb', line 62
def output_html
build_html_output
end
|
#reset ⇒ Object
22
23
24
|
# File 'lib/source_route.rb', line 22
def reset
wrapper.reset
end
|
#trace(opt, &block) ⇒ Object
Not implemented. used in irb or pry.
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/source_route.rb', line 44
def trace(opt, &block)
opt[:output_format] ||= :silence
wrapper.reset
opt.each do |k, v|
wrapper.condition.send(k, v)
end
wrapper.trace
yield
wrapper.tp.disable
SourceRoute.build_html_output if opt[:output_format].to_sym == :html
end
|
#wrapper ⇒ Object
18
19
20
|
# File 'lib/source_route.rb', line 18
def wrapper
@@wrapper ||= Wrapper.instance
end
|