Bottle DSL: allow checksums access.
This commit is contained in:
parent
4a7c68763e
commit
bf828aa36b
@ -90,7 +90,8 @@ class Bottle < SoftwareSpec
|
|||||||
# a Hash, which indicates the platform the checksum applies on.
|
# a Hash, which indicates the platform the checksum applies on.
|
||||||
Checksum::TYPES.each do |cksum|
|
Checksum::TYPES.each do |cksum|
|
||||||
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
||||||
def #{cksum}(val)
|
def #{cksum}(val=nil)
|
||||||
|
return @#{cksum} if val.nil?
|
||||||
@#{cksum} ||= Hash.new
|
@#{cksum} ||= Hash.new
|
||||||
case val
|
case val
|
||||||
when Hash
|
when Hash
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user