Class: GuiDebugger::DebugPage

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

Class Method Summary collapse

Class Method Details

.displayObject



11
12
13
14
15
16
# File 'lib/gui_debugger/debug_page.rb', line 11

def self.display
  text = File.read(template("main"))
  html = Erubis::Eruby.new(text).evaluate(context: GuiDebugger.debug_context)

  [200, { "Content-Type" => "text/html; charset=utf-8" }, [html]]
end

.template(template_name) ⇒ Object



7
8
9
# File 'lib/gui_debugger/debug_page.rb', line 7

def self.template(template_name)
  File.expand_path("../templates/#{template_name}.html.erb", __FILE__)
end