Class: DebugExtras::DebugPage
- Inherits:
-
Object
- Object
- DebugExtras::DebugPage
- Defined in:
- lib/debug_extras/debug_page.rb
Instance Method Summary collapse
-
#initialize(exception, request_path) ⇒ DebugPage
constructor
A new instance of DebugPage.
- #render ⇒ Object
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
#render ⇒ Object
10 11 12 13 14 15 |
# File 'lib/debug_extras/debug_page.rb', line 10 def render template = File.read(File.("../templates/debug.html.erb", __FILE__)) styles = File.read(File.("../templates/styles.html", __FILE__)) @inject_styles = ERB.new(styles).result(binding) ERB.new(template).result(binding) end |