annotate elpa/yasnippet-0.11.0/snippets/ruby-mode/definitions/cls @ 156:c745e2cc79ee

elpy: update along with direct deps
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Mon, 27 Feb 2017 12:17:38 -0500 (2017-02-27)
parents elpa/yasnippet-0.9.1/snippets/ruby-mode/definitions/cls@ee4b6191b61e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
98
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
1 # name: class ... end
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
2 # contributor: hitesh <hitesh.jasani@gmail.com>
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
3 # key: cls
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
4 # --
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
5 class ${1:`(let ((fn (capitalize (file-name-nondirectory
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
6 (file-name-sans-extension
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
7 (or (buffer-file-name)
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
8 (buffer-name (current-buffer))))))))
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
9 (cond
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
10 ((string-match "_" fn) (replace-match "" nil nil fn))
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
11 (t fn)))`}
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
12 $0
156cbb54f344 Add elpy and deps
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
diff changeset
13 end