Module: Orange::Pulp::DebuggerHelpers

Defined in:
lib/orange-more/debugger/middleware/debugger.rb

Instance Method Summary collapse

Instance Method Details

#h_debug(obj) ⇒ Object

:nodoc:



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/orange-more/debugger/middleware/debugger.rb', line 28

def h_debug(obj)                  # :nodoc:
  case obj
  when String
    Rack::Utils.escape_html(obj)
  else
    begin 
      Rack::Utils.escape_html(obj.inspect)
    rescue Exception => e
      "Object #{obj.class.to_s} could not be inspected"
    end
  end
end