1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00
awesome_print/lib/ap/core_ext/kernel.rb
2010-04-05 20:50:56 -07:00

20 lines
520 B
Ruby

# 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
#------------------------------------------------------------------------------
module Kernel
def ai(options = {})
ap = AwesomePrint.new(options)
ap.send(:awesome, self)
end
alias :awesome_inspect :ai
def ap(object, options = {})
puts object.ai(options)
end
alias :awesome_print :ap
module_function :ap
end