Copyright © 2010-2016 Michael Dvorkin and contributors
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
# File lib/awesome_print/core_ext/kernel.rb, line 19 def ap(object, options = {}) puts object.ai(options) object unless AwesomePrint.console? end
# File lib/awesome_print/core_ext/kernel.rb, line 8 def ai(options = {}) ap = AwesomePrint::Inspector.new(options) awesome = ap.awesome self if options[:html] awesome = "<pre>#{awesome}</pre>" awesome = awesome.html_safe if defined? ActiveSupport end awesome end
# File lib/awesome_print/core_ext/kernel.rb, line 19 def ap(object, options = {}) puts object.ai(options) object unless AwesomePrint.console? end