/ Published in: Ruby
Note: most of these will be available to the shell and Rails' console too.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
## Required # install sudo gem install utility_belt # settings for ~/.irbrc require 'rubygems' require 'utility_belt' UtilityBelt::Themes.background(:light) #optional ## Now you can play in irb # Interactively edit IRB code in TextMate mate # read from clipboard MacClipboard.read # write to clipboard MacClipboard.write 'some text to be pasted elsewhere' # review history h # 'history' also works, but who wants to type? # re-play last command h! # re-play arbitrary command from history h! 123 # save history to some file history_write('/path/to/file') # find class name grep_classes("num") #=> ["Bignum", "Fixnum", "Numeric", "REXML::SyncEnumerator"] # find method name "foo".grep_methods("pretty") #=> ["pretty_inspect", "pretty_print_instance_variables", ... ] # google for whatever's in clipboard # arbitrary google search google singleWord google 'multiple words'
URL: http://utilitybelt.rubyforge.org/usage.html