Sha256: 8fd7cfb89e24cc0c8bd1f89625810dcfeb8c689212edb0696ba79185afc13d1e
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 Bytes
Contents
#!/usr/bin/env ruby require "bundler/setup" require "dhclient" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. def pretty_print(content, format=:json) if format == :xml require 'rexml/document' formatter = REXML::Formatters::Pretty.new formatter.compact = true xml = REXML::Document.new content formatter.write(xml, out) elsif format == :json out = JSON.parse(content) else out = "Unsupported format #{format}" end return out end # (If you use this, don't forget to add pry to your Gemfile!) require "pry" Pry.start # require "irb" # IRB.start(__FILE__)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dhclient-0.1.4 | bin/dhconsole |