Created
May 4, 2016 02:55
-
-
Save anonymous/1bd82a200532265a3a24bea023e26c9d to your computer and use it in GitHub Desktop.
This file contains 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 func(line) | |
$myVar = [] | |
comms = line.split(" ")[0] | |
case comms[0] | |
when "classA" | |
$myVar = classA.new(comms[1]) | |
when "doB" | |
b = ClassB.new("abc") | |
$myVar.add(b) #I am having error in this line. Add is a function of class A, but here its giving nil error | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment