my-emacs-d/elpa/yasnippet-20160924.2001/snippets/ruby-mode/cls
2016-10-20 10:27:10 +02:00

12 lines
352 B
Plaintext

#name : class ... end
#contributor : hitesh <hitesh.jasani@gmail.com>
#group : definitions
# --
class ${1:`(let ((fn (capitalize (file-name-nondirectory
(file-name-sans-extension
(or (buffer-file-name)
(buffer-name (current-buffer))))))))
(replace-regexp-in-string "_" "" fn t t))`}
$0
end