Skip to content

Commit

Permalink
Add ruby's class and module support (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
wamaral authored and jacktasia committed Jun 7, 2016
1 parent cfe4998 commit 910e4b2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions dumb-jump.el
Expand Up @@ -184,11 +184,21 @@

;; ruby
(:type "variable" :supports ("ag" "grep") :language "ruby"
:regex "\\s*JJJ\\s*=[^=\\n]+" :tests ("test = 1234") :not ("if test == 1234"))
:regex "\\s*JJJ\\s*=[^=\\n]+"
:tests ("test = 1234")
:not ("if test == 1234"))

(:type "function" :supports ("ag" "grep") :language "ruby"
:regex "\\bdef\\s*JJJ\\s*\\\("
:tests ("def test(asdf)" "def test()"))
:regex "\\bdef\\s+JJJ\\j"
:tests ("def test(foo)" "def test()" "def test foo" "def test; end"))

(:type "type" :supports ("ag") :language "ruby"
:regex "\\bclass\\s+(?:\\w*::)*JJJ\\j"
:tests ("class Test" "class Foo::Test"))

(:type "type" :supports ("ag") :language "ruby"
:regex "\\bmodule\\s+(?:\\w*::)*JJJ\\j"
:tests ("module Test" "module Foo::Test"))

;; scala
(:type "variable" :supports ("ag" "grep") :language "scala"
Expand Down

0 comments on commit 910e4b2

Please sign in to comment.