PageRenderTime 282ms CodeModel.GetById 121ms app.highlight 0ms RepoModel.GetById 161ms app.codeStats 0ms

/ruby-mode/Searching and Selection/fetch(name) { |key| .. } (fet).yasnippet

http://github.com/ridgetang/snippets
Unknown | 6 lines | 6 code | 0 blank | 0 comment | 0 complexity | 3012d7c52526891fc07bc02c6cb41a32 MD5 | raw file
1# -*- mode: snippet -*-
2# key: fet
3# contributor: Translated from TextMate Snippet
4# name: fetch(name) { |key| .. }
5# --
6fetch(${1:name}) { ${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:|)/}${2:key}${2/(^(?<var>\s*(?:\*|\*?[a-z_])[a-zA-Z0-9_]*\s*)(,\g<var>)*,?\s*$)|.*/(?1:| )/}$0 }