module Kernel
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
Public Class Methods
ap(object, options = {})
click to toggle source
# File lib/awesome_print/core_ext/kernel.rb, line 19 def ap(object, options = {}) puts object.ai(options) object unless AwesomePrint.console? end
Also aliased as: awesome_print
Public Instance Methods
ai(options = {})
click to toggle source
# 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
Also aliased as: awesome_inspect
Private Instance Methods
ap(object, options = {})
click to toggle source
# File lib/awesome_print/core_ext/kernel.rb, line 19 def ap(object, options = {}) puts object.ai(options) object unless AwesomePrint.console? end
Also aliased as: awesome_print