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) ⇒ 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.
3 4 5 |
# File 'lib/rshade/trace.rb', line 3 def config @config end |
#event_store ⇒ Object (readonly)
Returns the value of attribute event_store.
3 4 5 |
# File 'lib/rshade/trace.rb', line 3 def event_store @event_store end |
Class Method Details
.reveal(config = nil, &block) ⇒ Object
11 12 13 |
# File 'lib/rshade/trace.rb', line 11 def self.reveal(config=nil, &block) new(config).reveal(&block) end |
Instance Method Details
#reveal(&block) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rshade/trace.rb', line 15 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
23 24 25 |
# File 'lib/rshade/trace.rb', line 23 def show config.formatter.call(event_store) end |