Sha256: f36985dced4895042328930154b49bf091a3527d4f8b0169ed95f04721b2a83e
Contents?: true
Size: 405 Bytes
Versions: 1
Compression:
Stored size: 405 Bytes
Contents
require "json_pp/version" require 'json' require 'awesome_print' require 'optparse' module JsonPp def self.usage() end def self.run() if STDIN.tty? puts 'your_command | json [--no-color]' else data = JSON.parse(STDIN.read) if ARGV.include?('--no-color') puts JSON.pretty_generate(data) else require 'ap' ap data end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json_pp-0.0.1 | lib/json_pp.rb |