Skip to content

Instantly share code, notes, and snippets.

@coderek
Last active December 24, 2015 06:48
Show Gist options
  • Save coderek/6759171 to your computer and use it in GitHub Desktop.
Save coderek/6759171 to your computer and use it in GitHub Desktop.
# awesome print
# Awesome Print is a Ruby library that pretty prints Ruby objects in full color exposing their internal structure with proper indentation. Rails ActiveRecord objects and usage within Rails templates are supported via included mixins.
# grab zipped gem from https://github.com/michaeldv/awesome_print/archive/master.zip
# command to compile
# `jrubyc ap.rb`
# command to run
# `java -cp .:/path/to/jruby-complete-1.7.4.jar ap`
# read more functions at https://github.com/michaeldv/awesome_print
$:.unshift "D:\\awesome_print\\lib" # replace with your unzipped lib folder path
require "awesome_print"
hash = {:hello => "world", :animals => {:dog=> "bark", :cat=>"miao"}}
ap hash[:animals]
ap hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment