aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-08-31 08:09:50 -0400
committerMax Howell2012-08-31 10:22:10 -0400
commit113ed85e8dc25f71031df13d90d98a7016458a68 (patch)
tree5fe253043d26af6690bf79e9df1cf197314a3e28 /Library
parent04173d55c20421df10e813114bfa9d806922c610 (diff)
downloadbrew-113ed85e8dc25f71031df13d90d98a7016458a68.tar.bz2
More brew irb examples
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/irb.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/irb.rb b/Library/Homebrew/cmd/irb.rb
index c43fa9f07..0755ecda8 100644
--- a/Library/Homebrew/cmd/irb.rb
+++ b/Library/Homebrew/cmd/irb.rb
@@ -2,6 +2,11 @@ require 'formula'
require 'keg'
require 'irb'
+class Symbol
+ def f
+ Formula.factory(self)
+ end
+end
class String
def f
Formula.factory(self)
@@ -11,8 +16,10 @@ end
module Homebrew extend self
def irb
if ARGV.include? "--help"
- puts "Formula.factory('ace').installed?"
- puts "ack.f # => instance of the Ack formula"
+ puts "'v8'.f # => instance of the Ack formula"
+ puts ":hub.f.installed?"
+ puts ":lua.f.methods - 1.methods"
+ puts ":mpd.f.recursive_deps.reject{|f| f.installed? }"
else
ohai "Interactive Homebrew Shell"
puts "Example commands available with: brew irb --help"