Module: Tracing::TraceExt
- Defined in:
- lib/trace_calls/trace_ext.rb
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
Instance Method Summary collapse
- #exec_action_handlers(txt, context) ⇒ Object
- #handle_after_call(context) ⇒ Object
- #handle_before_call(context) ⇒ Object
- #trace_method?(context) ⇒ Boolean
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
6 7 8 |
# File 'lib/trace_calls/trace_ext.rb', line 6 def configuration @configuration end |
Class Method Details
.configure(configuration) ⇒ Object
8 9 10 |
# File 'lib/trace_calls/trace_ext.rb', line 8 def configure(configuration) @configuration ||= configuration if configuration.kind_of? Tracing::Configuration end |
Instance Method Details
#exec_action_handlers(txt, context) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/trace_calls/trace_ext.rb', line 26 def exec_action_handlers(txt, context) _handlers = Tracing::TraceExt.action_handlers # puts "exec_action_handlers:" + _handlers.inspect return if !_handlers || !_handlers.kind_of?(Array) # puts "each handler..." _handlers.each do |handler| handler.handle(txt, context) end end |
#handle_after_call(context) ⇒ Object
22 23 24 |
# File 'lib/trace_calls/trace_ext.rb', line 22 def handle_after_call(context) exec_action_handlers('END' , context) end |
#handle_before_call(context) ⇒ Object
18 19 20 |
# File 'lib/trace_calls/trace_ext.rb', line 18 def handle_before_call(context) exec_action_handlers('BEGIN' , context) end |
#trace_method?(context) ⇒ Boolean
14 15 16 |
# File 'lib/trace_calls/trace_ext.rb', line 14 def trace_method?(context) filters_allow?('', context) end |