Created
October 4, 2019 09:18
-
-
Save ziyan-junaideen/d89c3b7c2a4fb04ab05ff2454f1878b1 to your computer and use it in GitHub Desktop.
Scripting within a VSCode Snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initialize(${1}) | |
<split ${1} by comma and for each split> | |
@{split} = #{split} | |
<end> | |
end | |
# So that some thing like this `def initialize(a, b)` would result | |
def initialize(a, b) | |
@a = a | |
@b = b | |
end | |
# and for `def initialize(a, b, c)` would result | |
def initialize(a, b) | |
@a = a | |
@b = b | |
@c = c | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment