doomemacs/modules/feature/file-templates/templates/ruby-mode/__module

12 lines
548 B
Text
Raw Normal View History

2017-02-11 07:00:31 -05:00
# `(progn
(setq-local pkgs (s-split "/" (s-chop-prefix (concat (doom-project-root) "lib/") (file-name-sans-extension buffer-file-name)) t))
2017-02-11 07:00:31 -05:00
(setq-local pkgs-p (eq (length pkgs) 1))
(setq-local pkg-module (s-replace " " "::" (s-titleized-words (if pkgs-p (car pkgs) (s-join " " (butlast pkgs))))))
2017-02-11 07:00:31 -05:00
(concat "lib/" (file-name-nondirectory buffer-file-name)))`
2017-02-11 07:00:31 -05:00
module `pkg-module`
`(when pkgs-p " VERSION='0.0.1'\n\n")``(concat " class " (if pkgs-p "<< self" (s-capitalize (car (last pkgs)))))`
2017-02-11 07:00:31 -05:00
`%`${0:# Code here}
end
end