Class: Rack::Insight::PanelApp

Inherits:
Object
  • Object
show all
Includes:
Render
Defined in:
lib/rack/insight/panel_app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Render

#compile, #compile!, #compiled_source, #method_name, #method_name_without_locals, #signed_params

Methods included from Logging

logger, verbose, verbosity

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.



6
7
8
# File 'lib/rack/insight/panel_app.rb', line 6

def request
  @request
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
# File 'lib/rack/insight/panel_app.rb', line 8

def call(env)
  @request = Rack::Request.new(env)
  dispatch
end

#not_found(message = "") ⇒ Object



21
22
23
# File 'lib/rack/insight/panel_app.rb', line 21

def not_found(message="")
  [404, {}, [message]]
end

#paramsObject



17
18
19
# File 'lib/rack/insight/panel_app.rb', line 17

def params
  @request.GET
end

#render_template(*args) ⇒ Object



13
14
15
# File 'lib/rack/insight/panel_app.rb', line 13

def render_template(*args)
  Rack::Response.new([super]).to_a
end

#validate_paramsObject



25
26
27
# File 'lib/rack/insight/panel_app.rb', line 25

def validate_params
  ParamsSignature.new(request).validate!
end