class God::Conditions::Always
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
Attributes
what[RW]
The Boolean determining whether this condition will always trigger (true) or never trigger (false).
Public Class Methods
new()
click to toggle source
# File lib/god/conditions/always.rb, line 21 def initialize self.info = "always" end
Public Instance Methods
test()
click to toggle source
# File lib/god/conditions/always.rb, line 31 def test @what end
valid?()
click to toggle source
# File lib/god/conditions/always.rb, line 25 def valid? valid = true valid &= complain("Attribute 'what' must be specified", self) if self.what.nil? valid end