Created
June 9, 2010 16:33
-
-
Save rwilcox/431757 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ scopeName = 'source.ruby.rails.aasm'; | |
fileTypes = ( 'rb', 'rxml', 'builder' ); | |
patterns = ( | |
{ name = 'meta.rails.model'; | |
comment = "Uses lookahead to match classes that (may) inherit from ActiveRecord::Base; includes 'source.ruby' to avoid infinite recursion"; | |
begin = '(^\s*)(?=class\s+.+ActiveRecord::Base)'; | |
end = '^\1(?=end)\b'; | |
patterns = ( | |
{ include = '$self'; }, | |
{ include = 'source.ruby'; }, | |
{ include = 'source.ruby.rails'; }, | |
); | |
}, | |
{ name = 'source.ruby.rails.aasm.event'; | |
match = 'aasm_event\W*:(\w+)'; | |
captures = { 1 = { name = 'keyword.other.context.ruby.rails.aasm.event'; }; }; | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment