File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -16,23 +16,25 @@ def initialize(info={})
16
16
17
17
def action
18
18
sa = datastore [ 'ACTION' ]
19
- sa ? find_action ( sa ) : find_action ( default_action )
19
+ return find_action ( default_action ) if not sa
20
+ return find_action ( sa )
20
21
end
21
22
22
23
def find_action ( name )
23
- if name
24
- actions . each do |a |
25
- return a if a . name == name
26
- end
24
+ return nil if not name
25
+ actions . each do |a |
26
+ return a if a . name == name
27
27
end
28
+ return nil
28
29
end
29
30
30
31
#
31
32
# Returns a boolean indicating whether this module should be run passively
32
33
#
33
34
def passive?
34
- act = action
35
- act ? passive_action? ( act . name ) : self . passive
35
+ act = action ( )
36
+ return passive_action? ( act . name ) if act
37
+ return self . passive
36
38
end
37
39
38
40
#
You can’t perform that action at this time.
0 commit comments