# File lib/kwala/lib/code_analyzer.rb, line 331 def group_methods(tokens) # meth_groups = [] # # cur_group_toks = [] # indent = 0 # indef = false # # tokens.each do |tok| # cur_group_toks<< tok # # if tok.class == TkDEF # indent = tok.indent # indef = true # cur_group_toks = [ tok ] # elsif tok.class == TkEND # if indef && (tok.indent == (indent - 1)) # indef = false # indent = tok.indent # # meth_groups<< cur_group_toks # cur_group_toks = [] # end # end # end # # puts "Meth group #{ meth_groups.size }" # pp meth_groups # exit # groups, idx = group_tokens(tokens, [TkDEF]) puts "Meth groups cnt #{ groups.size }" pp groups exit end