Ruby local variable is undefined
In Ruby local variables only accessible in the scope that they are defined. Whenever you enter/leave a Class, a Module or a Method definiton your scope changes in Ruby. For instance : v1 = 1 class MyClass # SCOPE GATE: entering class v2 = 2 local_variables # => [“v2”] def my_method # SCOPE GATE: entering … Read more