Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created February 24, 2014 18:46
Show Gist options
  • Save rummelonp/9194360 to your computer and use it in GitHub Desktop.
Save rummelonp/9194360 to your computer and use it in GitHub Desktop.
yasnippet の ruby の class のやつ
#name : class ... end
#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))`}
$0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment