Class: Rack::WebProfiler::Engine::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/web_profiler/engine.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, response) ⇒ Processor

Returns a new instance of Processor.



75
76
77
78
79
80
# File 'lib/rack/web_profiler/engine.rb', line 75

def initialize(request, response)
  @collectors = {}
  @request    = request.clone.freeze
  @response   = response.clone.freeze
  @record     = nil
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



73
74
75
# File 'lib/rack/web_profiler/engine.rb', line 73

def record
  @record
end

Instance Method Details

#save!Object



82
83
84
85
86
87
# File 'lib/rack/web_profiler/engine.rb', line 82

def save!
  create_record!
  save_collected_datas!

  @record.save({ transaction: true })
end