Sha256: 65fbac125d5a950212036022efdcddde0b08799642feb77d361397c79cd0aa44
Contents?: true
Size: 405 Bytes
Versions: 12
Compression:
Stored size: 405 Bytes
Contents
module Kernel # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. def j(*objs) objs.each do |obj| puts JSON::unparse(obj) end nil end # Ouputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. def jj(*objs) objs.each do |obj| puts JSON::pretty_unparse(obj) end nil end end
Version data entries
12 entries across 12 versions & 1 rubygems