Class: DebugExtras::DebugPage

Inherits:
Object
  • Object
show all
Defined in:
lib/debug_extras/debug_page.rb

Instance Method Summary collapse

Constructor Details

#initialize(exception, request_path) ⇒ DebugPage

Returns a new instance of DebugPage.



5
6
7
8
# File 'lib/debug_extras/debug_page.rb', line 5

def initialize(exception, request_path)
  @exception = exception
  @request_path = request_path
end

Instance Method Details

#renderObject



10
11
12
13
14
15
# File 'lib/debug_extras/debug_page.rb', line 10

def render
  template = File.read(File.expand_path("../templates/debug.html.erb", __FILE__))
  styles = File.read(File.expand_path("../templates/styles.html", __FILE__))
  @inject_styles = ERB.new(styles).result(binding)
  ERB.new(template).result(binding)
end