Skip to content

Commit eefb58f

Browse files
committed
add ternary operator snippet to Ruby snippets
1 parent d7965cc commit eefb58f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

UltiSnips/ruby.snippets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ snippet unlessl "[do something] unless [condition]"
9494
${1:${VISUAL}} unless ${0:condition}
9595
endsnippet
9696

97+
# ternary
98+
snippet t?: "true ? 'this is true' : 'this is false'"
99+
${1:${VISUAL:condition}} ? ${2:'this is true'} : ${3:'this is false'}
100+
endsnippet
101+
97102
#
98103
# case switch
99104
#

0 commit comments

Comments
 (0)