# -*- mode: snippet -*-
# type: command
# key: {
# contributor: Translated from TextMate Snippet
# name: Insert { |variable| … }
# condition: (not (or (yas/ruby-in-comment-p) (yas/ruby-in-string-p)))
# --
(yas/expand-snippet (concat 
                    "{ ${1:$(if (string= yas/text \"\") \"\" \"|\")}${1:variable}${1:$(if (string= yas/text \"\") \" \" \"| \")}`yas/selected-text`$0"
                    (save-excursion (if (search-forward-regexp "}" (line-end-position) t)
                                    "" "}"))))
                                
                    
