P
Parv G.
hello all,
i'm new to ruby and need some help on what seems like a simple issue.
How do i find out if the argument passed to a method is a string or an
integer?
Here's what i'm trying to do:
def method_test(some_arg)
if some_arg is string
#callmethod A
else
#callmethod B
end
end
Thanks for your help.
Parv
i'm new to ruby and need some help on what seems like a simple issue.
How do i find out if the argument passed to a method is a string or an
integer?
Here's what i'm trying to do:
def method_test(some_arg)
if some_arg is string
#callmethod A
else
#callmethod B
end
end
Thanks for your help.
Parv