aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-09-11 12:57:53 -0700
committerCharlie Sharpsteen2011-09-16 08:55:38 -0700
commit06fbecbeaefbcd82db8e0215b964e30ef3378ff0 (patch)
treedb106759536b6b2c05fcecd96e61d2e840b33168 /Library/Homebrew/formula.rb
parent8c9f595a834b324d53f461f4f9b81bcfc33dcc18 (diff)
downloadhomebrew-06fbecbeaefbcd82db8e0215b964e30ef3378ff0.tar.bz2
Centralize definition of `rack` in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it gets defined and used quite a bit. This patch makes `rack` an official method of the `Formula` class.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index ca8e489c3..2ecf30758 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -170,6 +170,7 @@ class Formula
validate_variable :version
HOMEBREW_CELLAR+@name+@version
end
+ def rack; prefix.parent end
def bin; prefix+'bin' end
def doc; prefix+'share/doc'+name end