Sha256: d98d6c2118e165ce4f1c06227ae43804e183c2b056f177a0e6415ea209b902ca
Contents?: true
Size: 478 Bytes
Versions: 16
Compression:
Stored size: 478 Bytes
Contents
module Swift class Errors < Array attr_accessor :relation def initialize relation @relation = relation end end # Errors class Scheme def self.validations &validations define_method :validate do errors = Errors.new(self) instance_exec errors, &validations errors end end def validate errors = Errors.new(self) errors end def valid? validate.empty? end end # Scheme end # Swift
Version data entries
16 entries across 16 versions & 1 rubygems