diff --git a/lib/ap.rb b/lib/ap.rb index 5d3264b..5d6dd77 100755 --- a/lib/ap.rb +++ b/lib/ap.rb @@ -5,6 +5,7 @@ #------------------------------------------------------------------------------ require File.dirname(__FILE__) + "/ap/core_ext/string" require File.dirname(__FILE__) + "/ap/core_ext/kernel" +require File.dirname(__FILE__) + "/ap/core_ext/object" require File.dirname(__FILE__) + "/ap/awesome_print" require File.dirname(__FILE__) + "/ap/mixin/rails" if defined?(::Rails) diff --git a/lib/ap/core_ext/object.rb b/lib/ap/core_ext/object.rb new file mode 100644 index 0000000..5b75df6 --- /dev/null +++ b/lib/ap/core_ext/object.rb @@ -0,0 +1,11 @@ +# Copyright (c) 2010 Michael Dvorkin +# +# Awesome Print is freely distributable under the terms of MIT license. +# See LICENSE file or http://www.opensource.org/licenses/mit-license.php +#------------------------------------------------------------------------------ +class Object + def awesome_inspect(options = {}) + ap = AwesomePrint.new(options) + ap.send(:awesome, self).to_s + end +end