ruby Tutorials

11. escapeHTML() in Ruby

By: Jeeva : 2009-03-03

Description: Escape special characters in HTML


12. new(type = "query") in Ruby

By: Jeeva : 2009-03-03

Description: If the CGI object is not created in a standard CGI call environment (that is, it can’t locate REQUEST_METHOD in its environment), then it will run in "offline" mode. In this mode, it reads its parameters from the command line or (failing that) from standard input. Otherwise, cookies and other parameters are parsed automatically from the standard CGI locations, which varies according to the REQUEST_METHOD.


13. parse(query) in Ruby

By: Jeeva : 2009-03-03

Description: Parse an HTTP query string into a hash of key=>value pairs.


14. pretty() in Ruby

By: Jeeva : 2009-03-03

Description: Prettify (indent) an HTML string


15. Format a Time object as a String in Ruby

By: Jeeva : 2009-03-03

Description: Format a Time object as a String using the format specified by RFC 1123.


16. URL decode a string in Ruby

By: Jeeva : 2009-03-03

Description: URL-decode a string


17. unescapeElement() in Ruby

By: Jeeva : 2009-03-03

Description: Undo escaping such as that done by CGI::escapeElement()


18. unescapeHTML() in Ruby

By: Jeeva : 2009-03-03

Description: Unescape a string that has been HTML-escaped


19. header() in Ruby

By: Jeeva : 2009-03-03

Description: Create an HTTP header block as a string


20. out() in Ruby

By: Jeeva : 2009-03-03

Description: Print an HTTP header and body to $DEFAULT_OUTPUT