ruby - Undefined method for main:Object (NoMethodError) though method is defined -
i have defined script following code snippet:
check_params param def check_params(param) # code end
when run get
undefined method `check_params' main:object (nomethoderror)
ruby expects method declared before call it, try move method definition before call method like:
def check_params(param) # code end check_params param
Comments
Post a Comment