R
Ralph Shnelvar
[Note: parts of this message were removed to make it a legal post.]
Ruby has __FILE__ and __LINE__ to give the file and line omber where we are currently at in the code.
Consider
Class X
def my_method
m = ??? # I want m to be assigned "my_method"
end
end
How can I get m set properly?
I guess I could use define_method to define my_method and then pass the name into the function .. but that is so ugly and also flattens scope that I may not want flattened.
Ruby has __FILE__ and __LINE__ to give the file and line omber where we are currently at in the code.
Consider
Class X
def my_method
m = ??? # I want m to be assigned "my_method"
end
end
How can I get m set properly?
I guess I could use define_method to define my_method and then pass the name into the function .. but that is so ugly and also flattens scope that I may not want flattened.