https://github.com/cldwalker/ripl-after_rc
A ripl plugin that defines blocks to run after ~/.irbrc
https://github.com/cldwalker/ripl-after_rc
Last synced: 16 days ago
JSON representation
A ripl plugin that defines blocks to run after ~/.irbrc
- Host: GitHub
- URL: https://github.com/cldwalker/ripl-after_rc
- Owner: cldwalker
- License: mit
- Created: 2010-11-09T06:51:50.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-11-09T07:17:56.000Z (over 15 years ago)
- Last Synced: 2025-03-20T10:44:16.630Z (about 1 year ago)
- Language: Ruby
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- Changelog: CHANGELOG.rdoc
- License: LICENSE.txt
Awesome Lists containing this project
README
== Description
This ripl plugin provides a simple way to define blocks which are
run after ~/.irbrc is loaded. A more useful version of IRB.conf[:IRB_RC].
== Install
Install the gem with:
sudo gem install ripl-after_rc
== Usage
Add to your ~/.riplrc
require 'ripl/after_rc'
Anywhere in your ~/.irbrc
Ripl.after_rc do
# some code to run after ~/.irbrc
end
You can call Ripl.after_rc as many times as you'd like and the blocks
will be called later in the order they were defined.
== Motivation
So why use this at all? Say you have some Rails helpers to define but Rails doesn't get loaded until
later in the irbrc or after irbrc. Simply pass Ripl.after_rc a block and it will be called later
when Rails is available.