Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Require
- def self.method_missing( subject, &block )
- require subject.to_s
- block.call if block_given?
- self
- rescue LoadError => e
- warn "Could not require `#{subject}': #{e.to_s}"
- end
- end
- # Adding some wirble colorize
- #
- Require.rubygems.wirble do
- Wirble.init
- Wirble.colorize unless ENV[ "WIRBLE_NOCOLOR" ]
- end
- # .. and interactive editor
- #
- Require.interactive_editor do
- module InteractiveEditor::Editors
- def ed(*args)
- InteractiveEditor.edit(ENV['EDITOR'],*args)
- end
- end
- end
Add Comment
Please, Sign In to add comment