Skip to content

Commit 7fe1302

Browse files
Iwakura Tarolpil
authored andcommitted
Method with memoization
1 parent 68dfbcc commit 7fe1302

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

snippets/ruby.snippets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ snippet def
4444
def ${1:method_name}
4545
${0}
4646
end
47+
snippet defm
48+
def ${1:method}
49+
@$1 ||= ${0}
50+
end
4751
snippet deft
4852
def test_${1:case_name}
4953
${0}

0 commit comments

Comments
 (0)