ruby - How do I fix this NameError? -
I want to use value v inside an example method on a particular object's meta :
v = ParserMap [kind] [: verification] # We want to use this value later. S = ParserMap [kind] [: specs] const_set (name, lambda {p = parser.new (s) # this line is a new area ... class Unfortunately, the class keyword starts a new field, so I lose old scope and given a name to me. Okay?
change Will return, so that you can call it at class with class class_eval . The block given to class_eval will then implement in the context of the metaCLAS (as it was before), but a new area Without starting.
Comments
Post a Comment