I thought this should work:
def setMethod(method)
if method in @@methods
... do something
end
end
But I keep getting keyword error for in
I thought this should work:
def setMethod(method)
if method in @@methods
... do something
end
end
But I keep getting keyword error for in
Try this, assuming @@methods
is an array:
if @@methods.include?(method)
# ...
end