aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/resource.rb
diff options
context:
space:
mode:
authorMisty De Meo2014-06-02 23:32:42 -0700
committerMisty De Meo2014-09-01 19:56:43 -0700
commit70cfa78f18a1806e53b44374c0362dc02439425f (patch)
treeadfe981ae9a8b2aaa6c5b90538af14ce278d4aac /Library/Homebrew/resource.rb
parent7d1b8643afba1e5d1274f5a2b8c6a7ab6434cd49 (diff)
downloadhomebrew-70cfa78f18a1806e53b44374c0362dc02439425f.tar.bz2
Add Go language module, resources
This introduces a new GoResource category of resource. GoResources have a specialized stage method which allows a resource to stage itself into a gopath. The new Go language module provides a one-liner to stage all GoResources present in the formula.
Diffstat (limited to 'Library/Homebrew/resource.rb')
-rw-r--r--Library/Homebrew/resource.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb
index 66372ad3e..97dcdf976 100644
--- a/Library/Homebrew/resource.rb
+++ b/Library/Homebrew/resource.rb
@@ -130,4 +130,10 @@ class Resource
raise TypeError, "version '#{val.inspect}' should be a string"
end
end
+
+ class Go < Resource
+ def stage target
+ super(target/name)
+ end
+ end
end