Get all local variables or available methods from irb?

前端 未结 3 983
深忆病人
深忆病人 2021-02-12 09:36

When I go into irb and type in a command that does not exist I get an error stating

\"undefined local variable or method \'my_method\' for main:Object (NameError         


        
3条回答
  •  难免孤独
    2021-02-12 09:51

    Look for methods in the Kernel, Object and Module : e.g. local_variables, instance_methods, instance_variables.

    Other great methods in there. inspect is another one.

提交回复
热议问题