module Kernel
Copyright © 2010-2016 Michael Dvorkin and contributors
AmazingPrint
is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Public Class Methods
ap(object, options = {})
click to toggle source
# File lib/amazing_print/core_ext/kernel.rb, line 18 def ap(object, options = {}) puts object.ai(options) object unless AmazingPrint.console? end
Also aliased as: amazing_print
Public Instance Methods
ai(options = {})
click to toggle source
# File lib/amazing_print/core_ext/kernel.rb, line 7 def ai(options = {}) ap = AmazingPrint::Inspector.new(options) awesome = ap.awesome self if options[:html] awesome = "<pre>#{awesome}</pre>" awesome = awesome.html_safe if defined? ActiveSupport end awesome end
Also aliased as: awesome_inspect
Private Instance Methods
ap(object, options = {})
click to toggle source
# File lib/amazing_print/core_ext/kernel.rb, line 18 def ap(object, options = {}) puts object.ai(options) object unless AmazingPrint.console? end
Also aliased as: amazing_print