Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or www.opensource.org/licenses/mit-license.php
Copyright © 2010-2012 Michael Dvorkin
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/inspector.rb, line 18 def console? !!(defined?(IRB) || defined?(Pry)) end
Class accessor to force colorized output (ex. forked subprocess where TERM might be dumb).
# File lib/awesome_print/inspector.rb, line 14 def force_colors!(value = true) @force_colors = value end
# File lib/awesome_print/inspector.rb, line 36 def inspect_object(object) object.ai end
# File lib/awesome_print/inspector.rb, line 26 def irb! return unless defined?(IRB) unless IRB.version.include?("DietRB") IRB::Irb.class_eval do def output_value ap @context.last_value end end else # MacRuby IRB.formatter = Class.new(IRB::Formatter) do def inspect_object(object) object.ai end end.new end end
# File lib/awesome_print/inspector.rb, line 30 def output_value ap @context.last_value end
# File lib/awesome_print/inspector.rb, line 43 def pry! if defined?(Pry) Pry.print = proc { |output, value| output.puts value.ai } end end
Generated with the Darkfish Rdoc Generator 2.