diff --git a/languages/ruby/outline.scm b/languages/ruby/outline.scm index 896ccc6..693294d 100644 --- a/languages/ruby/outline.scm +++ b/languages/ruby/outline.scm @@ -5,9 +5,37 @@ ((identifier) @context (#match? @context "^(private|protected|public)$")) @item -(method - "def" @context - name: (_) @name) @item +(body_statement + (call + method: (identifier) @context + arguments: (argument_list + (method + "def" @context + name: (_) @name) + )) @item +) + +(body_statement + (method + "def" @context + name: (_) @name) @item +) + +(program + (call + method: (identifier) @context + arguments: (argument_list + (method + "def" @context + name: (_) @name) + )) @item +) + +(program + (method + "def" @context + name: (_) @name) @item +) (singleton_method "def" @context