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