Class: Stackprofiler::WebUI
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Stackprofiler::WebUI
- Defined in:
- lib/stackprofiler/web_ui.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ WebUI
constructor
A new instance of WebUI.
Constructor Details
#initialize(options = {}) ⇒ WebUI
Returns a new instance of WebUI.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/stackprofiler/web_ui.rb', line 9 def initialize(={}) if [:file] data = File.read [:file] run = Oj.load data if run.is_a?(Hash) && run.has_key?(:frames) run = Run.new 'unknown', run, Time.now end RunDataSource.runs << run end super end |