mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Updated README on how to set up ~/.irbrc for MacRuby
This commit is contained in:
parent
75700ea330
commit
4dde5baab4
1 changed files with 12 additions and 3 deletions
15
README.md
15
README.md
|
@ -150,10 +150,19 @@ lines into your ~/.irbrc file:
|
|||
|
||||
require "rubygems"
|
||||
require "ap"
|
||||
IRB::Irb.class_eval do
|
||||
def output_value
|
||||
ap @context.last_value
|
||||
|
||||
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
|
||||
|
||||
### Logger Convenience Method ###
|
||||
|
|
Loading…
Reference in a new issue