Bottle DSL: allow checksums access.

This commit is contained in:
Mike McQuaid 2013-06-04 20:35:07 +01:00
parent 4a7c68763e
commit bf828aa36b

View File

@ -90,7 +90,8 @@ class Bottle < SoftwareSpec
# a Hash, which indicates the platform the checksum applies on.
Checksum::TYPES.each do |cksum|
class_eval <<-EOS, __FILE__, __LINE__ + 1
def #{cksum}(val)
def #{cksum}(val=nil)
return @#{cksum} if val.nil?
@#{cksum} ||= Hash.new
case val
when Hash