DESCRIPTION:
Little tools to enhance your irb experience
INSTALL:
- sudo gem install srizzo-irber
add to your ~/.irbrc
require 'irber'
BASIC USAGE:
E.g. a class:
class A
def a
"a"
end
end
generate a class or method's source code on the fly
>> psrc A class A < Object def a() "a" end end => nil
>> psrc A, :a def a() "a" end => nil
print its api
>> papi A A # a()
make any object inspect itself
>> [1,2].puts_it 1 2
>> [1,2].pp_it [1, 2]
>> A.psrc_it class A < Object def a() "a" end end
>> A.papi_it A # a()
FEATURES/PROBLEMS:
- generate a class or method source code on the fly (won't work for all classes and methods e.g: native classes)
- print any object's formatted api (filters Object, Kernel, Module and Class methods)
- make an object inspect itself
REQUIREMENTS:
- Ruby 1.8.x only
- ParseTree
- Ruby2Ruby
Copyright
Copyright (c) 2009 Samuel Rizzo. See LICENSE for details.