module HttpStub::Server::Application::TextFormattingSupport
Public Instance Methods
h(text)
click to toggle source
# File lib/http_stub/server/application/text_formatting_support.rb, line 7 def h(text) Rack::Utils.escape_html(text) end
pp(text)
click to toggle source
# File lib/http_stub/server/application/text_formatting_support.rb, line 11 def pp(text) text ? JSON.pretty_generate(JSON.parse(text)) : "" rescue JSON::ParserError text end