diff --git a/snippets/ruby-mode/definitions/mod b/snippets/ruby-mode/definitions/mod index fb3d030..118400c 100644 --- a/snippets/ruby-mode/definitions/mod +++ b/snippets/ruby-mode/definitions/mod @@ -1,11 +1,11 @@ # name: module ... end -# contributor: hitesh +# contributor: hitesh , jimeh # key: mod # -- module ${1:`(let ((fn (capitalize (file-name-nondirectory (file-name-sans-extension - (or (buffer-file-name) - (buffer-name (current-buffer)))))))) + (or (buffer-file-name) + (buffer-name (current-buffer)))))))) (cond ((string-match "_" fn) (replace-match "" nil nil fn)) (t fn)))`}