aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.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/software_spec.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/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 3dbcc0cc5..b2071e119 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -69,10 +69,10 @@ class SoftwareSpec
resources.has_key?(name)
end
- def resource name, &block
+ def resource name, klass=Resource, &block
if block_given?
raise DuplicateResourceError.new(name) if resource_defined?(name)
- res = Resource.new(name, &block)
+ res = klass.new(name, &block)
resources[name] = res
dependency_collector.add(res)
else