head DSL can accept a block
This commit is contained in:
parent
f2ebc0e325
commit
320356236d
@ -695,10 +695,16 @@ class Formula
|
||||
@devel.instance_eval(&block)
|
||||
end
|
||||
|
||||
def head val=nil, specs={}
|
||||
return @head if val.nil?
|
||||
@head ||= HeadSoftwareSpec.new
|
||||
@head.url(val, specs)
|
||||
def head val=nil, specs={}, &block
|
||||
if block_given?
|
||||
@head ||= HeadSoftwareSpec.new
|
||||
@head.instance_eval(&block)
|
||||
elsif val
|
||||
@head ||= HeadSoftwareSpec.new
|
||||
@head.url(val, specs)
|
||||
else
|
||||
@head
|
||||
end
|
||||
end
|
||||
|
||||
def version val=nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user