File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -25,5 +25,21 @@ def friendly_time_part(time_part)
2525 "**"
2626 end
2727 end
28+
29+ def friendly_extract_source_from_callable ( callable , with_affixes : true )
30+ source = RubyVM ::AbstractSyntaxTree . of ( callable , keep_script_lines : true ) . source
31+ return '-' unless source
32+
33+ source . strip!
34+ return source if with_affixes
35+
36+ source . tap do |source |
37+ source . delete_prefix! ( '{' )
38+ source . delete_suffix! ( '}' )
39+
40+ source . delete_prefix! ( 'do' )
41+ source . delete_suffix! ( 'end' )
42+ end
43+ end
2844 end
2945end
Original file line number Diff line number Diff line change 7777 < table >
7878 < thead >
7979 < tr >
80- < th > Job</ th >
80+ < th class =" width-15 " > Job</ th >
8181 < th class ="width-15 "> Period</ th >
8282 < th class ="width-15 "> Last Run</ th >
8383 < th class ="width-15 "> Action</ th >
9494 <% if at %>
9595 at <%= friendly_time_part ( at . instance_variable_get ( :@hour ) ) %> :<%= friendly_time_part ( at . instance_variable_get ( :@min ) ) %>
9696 <% end %>
97- <% if event . instance_variable_get ( :@if ) %>
98- if __
97+ <% if if_lambda = event . instance_variable_get ( :@if ) %>
98+ if: - > <%= friendly_extract_source_from_callable ( if_lambda ) %>
9999 <% end %>
100100 </ td >
101101 < td > <%= last_run ( @last_runs [ event . job ] ) %> </ td >
You can’t perform that action at this time.
0 commit comments