@@ -17,14 +17,10 @@ let s:readable_prototype = {}
1717
1818function ! s: add_methods (namespace, method_names)
1919 for name in a: method_names
20- let s: {a: namespace }_prototype[name] = s: function (' s:' .a: namespace .' _' .name)
20+ let s: {a: namespace }_prototype[name] = function (' s:' .a: namespace .' _' .name)
2121 endfor
2222endfunction
2323
24- function ! s: function (name) abort
25- return function (substitute (a: name , ' ^s:' , matchstr (expand (' <sfile>' ), ' .*\zs<SNR>\d\+_' ), ' ' ))
26- endfunction
27-
2824function ! s: sub (str,pat,rep)
2925 return substitute (a: str ,' \v\C' .a: pat ,a: rep ,' ' )
3026endfunction
@@ -446,7 +442,7 @@ call s:add_methods('readable',['end_of','last_opening_line','last_method_line','
446442function ! s: readable_find_affinity () dict abort
447443 let f = self .name ()
448444 let all = self .app ().projections ()
449- for pattern in reverse (sort (filter (keys (all ), ' v:val =~# "^[^*{}]*\\*[^*{}]*$"' ), s: function (' rails#lencmp' )))
445+ for pattern in reverse (sort (filter (keys (all ), ' v:val =~# "^[^*{}]*\\*[^*{}]*$"' ), function (' rails#lencmp' )))
450446 if ! has_key (all [pattern], ' affinity' )
451447 continue
452448 endif
@@ -3128,7 +3124,7 @@ function! s:readable_resolve_view(name, ...) dict abort
31283124 else
31293125 for format in [' .' .self .format (a: 0 ? a: 1 : 0 ), ' ' ]
31303126 let found = self .app ().relglob (' ' , ' app/views/' .name.format.' .*' )
3131- call sort (found, s: function (' s:dotcmp' ))
3127+ call sort (found, function (' s:dotcmp' ))
31323128 if ! empty (found)
31333129 return self .app ().path (found[0 ])
31343130 endif
@@ -4789,7 +4785,7 @@ function! s:readable_projected_with_raw(key, ...) dict abort
47894785 if has_key (all , f )
47904786 let mine += map (s: getlist (all [f ], a: key ), ' [s:expand_placeholders(v:val, a:0 ? a:1 : {}), v:val]' )
47914787 endif
4792- for pattern in reverse (sort (filter (keys (all ), ' v:val =~# "^[^*{}]*\\*[^*{}]*$"' ), s: function (' rails#lencmp' )))
4788+ for pattern in reverse (sort (filter (keys (all ), ' v:val =~# "^[^*{}]*\\*[^*{}]*$"' ), function (' rails#lencmp' )))
47934789 let [prefix, suffix; _] = split (pattern, ' \*' , 1 )
47944790 if s: startswith (f , prefix) && s: endswith (f , suffix)
47954791 let root = f [strlen (prefix) : - strlen (suffix)-1 ]
0 commit comments