Sha256: e0fb9aba05194b845a336909e580814e52d13f19d276c376b57041cc883abf34
Contents?: true
Size: 484 Bytes
Versions: 6
Compression:
Stored size: 484 Bytes
Contents
class Checked class Bools def check! is_bool = [TrueClass, FalseClass].include?(return!.class) demand is_bool, "...must be either of TrueClass or FalseClass." end def true! is_true = return!.class == TrueClass demand is_true, "...must be true (TrueClass)." end def false! is_false = return!.class == FalseClass demand is_false, "...must be false (FalseClass)." end end # === class Bools end # === class Checked
Version data entries
6 entries across 6 versions & 1 rubygems