Class: Wisper::Visualize::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/wisper/visualize/report.rb

Instance Method Summary collapse

Constructor Details

#initializeReport

Returns a new instance of Report.



5
6
7
8
9
# File 'lib/wisper/visualize/report.rb', line 5

def initialize
  Wisper.configure do |config|
    config.broadcaster :default, RecordingBroadcaster.new(config.broadcasters[:default])
  end
end

Instance Method Details

#eventsObject



11
12
13
# File 'lib/wisper/visualize/report.rb', line 11

def events
  Wisper.configuration.broadcasters[:default].flattened_events
end

#to_pdf(path) ⇒ Object



15
16
17
# File 'lib/wisper/visualize/report.rb', line 15

def to_pdf(path)
  graph.output(pdf: path)
end

#to_png(path) ⇒ Object



19
20
21
# File 'lib/wisper/visualize/report.rb', line 19

def to_png(path)
  graph.output(png: path)
end