Sha256: c8052e5373a7113e40f244834b4437b08e0ba2910bd329d42d7f712ac7d405cc
Contents?: true
Size: 746 Bytes
Versions: 12
Compression:
Stored size: 746 Bytes
Contents
module God module Conditions # Always trigger or never trigger. # # Examples # # # Always trigger. # on.condition(:always) do |c| # c.what = true # end # # # Never trigger. # on.condition(:always) do |c| # c.what = false # end class Always < PollCondition # The Boolean determining whether this condition will always trigger # (true) or never trigger (false). attr_accessor :what def initialize self.info = "always" end def valid? valid = true valid &= complain("Attribute 'what' must be specified", self) if self.what.nil? valid end def test @what end end end end
Version data entries
12 entries across 12 versions & 3 rubygems