lib/teapot/dependency.rb in teapot-0.9.10 vs lib/teapot/dependency.rb in teapot-1.0.0.pre.rc1
- old
+ new
@@ -43,19 +43,15 @@
def provides(name_or_aliases, &block)
if String === name_or_aliases || Symbol === name_or_aliases
name = name_or_aliases
- if block_given?
- provisions[name] = Provision.new(block)
- else
- provisions[name] = Provision.new(nil)
- end
+ provisions[name] = Provision.new(block)
else
aliases = name_or_aliases
aliases.each do |name, dependencies|
- provisions[name] = Alias.new(Array dependencies)
+ provisions[name] = Alias.new(Array(dependencies))
end
end
end
def provisions