Class: RShade::Trace
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#event_store ⇒ Object
readonly
Returns the value of attribute event_store.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config: ::RShade::Config::Registry.instance.default_trace_config) ⇒ Trace
constructor
A new instance of Trace.
- #reveal(&block) ⇒ Object
- #show ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/rshade/trace.rb', line 5 def config @config end |
#event_store ⇒ Object (readonly)
Returns the value of attribute event_store.
5 6 7 |
# File 'lib/rshade/trace.rb', line 5 def event_store @event_store end |
Class Method Details
Instance Method Details
#reveal(&block) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rshade/trace.rb', line 17 def reveal(&block) processor = EventProcessor.new(event_store, config) observer = EventObserver.new(config, processor) observable = RShade::TraceObservable.new([observer], config) observable.reveal(&block) self end |
#show ⇒ Object
25 26 27 |
# File 'lib/rshade/trace.rb', line 25 def show config.formatter.call(event_store) end |