Class: Rackprof::RequestObserver
- Defined in:
- lib/rackprof/request_observer.rb
Instance Attribute Summary
Attributes inherited from Observer
Instance Method Summary collapse
Methods inherited from Observer
Constructor Details
This class inherits a constructor from Rackprof::Observer
Instance Method Details
#update(profile) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/rackprof/request_observer.rb', line 3 def update(profile) profile.split("\n").each_with_index do |line, index| str = index == 0 ? "data: #{line}" : line connection << "#{str}<br />" end connection << "\n\n" end |