/ruby-mode/Classes and Modules/class .. initialize .. end.yasnippet
http://github.com/ridgetang/snippets · Unknown · 12 lines · 10 code · 2 blank · 0 comment · 0 complexity · 8833efe5783b98e4439c487ae77df77c MD5 · raw file
- # -*- mode: snippet -*-
- # key: cla
- # contributor: Translated from TextMate Snippet
- # name: class .. initialize .. end
- # --
- class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
- def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/}
- $0
- end
-
-
- end