Add ruby stuff
[emacs.git] / .emacs.d / elisp / yasnippet / snippets / ruby-mode / definitions / cls
1 # name: class ... end
2 # contributor: hitesh <hitesh.jasani@gmail.com>
3 # key: cls
4 # --
5 class ${1:`(let ((fn (capitalize (file-name-nondirectory
6 (file-name-sans-extension
7 (or (buffer-file-name)
8 (buffer-name (current-buffer))))))))
9 (cond
10 ((string-match "_" fn) (replace-match "" nil nil fn))
11 (t fn)))`}
12 $0
13 end