repo.or.cz
/
god.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
add lambda condition, sugar, and docs
[god.git]
/
lib
/
god
/
conditions
/
lambda.rb
blob
06f17784a19c645c61ca06c431e0a75570060f3a
1
module God
2
module Conditions
3
4
class Lambda < PollCondition
5
attr_accessor :lambda
6
7
def valid?
8
valid = true
9
valid &= complain("You must specify the 'lambda' attribute for :custom") if self.lambda.nil?
10
valid
11
end
12
13
def test
14
return self.lambda.call()
15
end
16
end
17
18
end
19
end