[Ruby] PP to Ruby as Var_dump to PHP

Ruby 中 pp(pretty print)的使用方法,require 'pp' 後即可像 PHP 的 var_dump 一樣輸出變數詳細內容,方便除錯。

1
2
require 'pp'
pp(ENV)

Usage:
pp(any_variable)

just like var_dump in php

comments powered by Disqus
Powered by Hugo. Theme Stack. All Rights Reserved.