Method: Rack::WebProfiler::View#initialize

Defined in:
lib/rack/web_profiler/view.rb

#initialize(template, layout: nil, context: nil) ⇒ View

Initialize a new view.

Parameters:

  • template (String)

    template file path or content

  • layout (Hash) (defaults to: nil)

    a customizable set of options

  • context (Hash) (defaults to: nil)

    a customizable set of options

Options Hash (layout:):

  • layout (String, nil)

    file path or content

Options Hash (context:):



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rack/web_profiler/view.rb', line 13

def initialize(template, layout: nil, context: nil)
  @template  = template
  @layout    = layout
  @context   = context

  @erb_options = {
    safe_level: nil,
    trim_mode:  "<>-",
    eoutvar:    "@_erbout",
  }
end