Class: Insight::PanelApp

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

Direct Known Subclasses

CachePanel::PanelApp, PanelsContent, PanelsHeader, SQLPanel::PanelApp

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

Instance Attribute Details

- (Object) request (readonly)

Returns the value of attribute request



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

def request
  @request
end

Instance Method Details

- (Object) call(env)



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

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

- (Object) not_found(message = "")



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

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

- (Object) params



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

def params
  @request.GET
end

- (Object) render_template(*args)



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

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

- (Object) validate_params



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

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