Sha256: 4cfa716fe8fe442324b3b9a44fb5e64f31820b165dc63cb19318bba1bd82d4d0
Contents?: true
Size: 493 Bytes
Versions: 12
Compression:
Stored size: 493 Bytes
Contents
module God module Conditions class Lambda < PollCondition attr_accessor :lambda def valid? valid = true valid &= complain("Attribute 'lambda' must be specified", self) if self.lambda.nil? valid end def test if self.lambda.call() self.info = "lambda condition was satisfied" true else self.info = "lambda condition was not satisfied" false end end end end end
Version data entries
12 entries across 12 versions & 3 rubygems