R
Reacher
Can you define function names dynamically in Ruby? Say you have:
class Myclass
def initialize()
@name = "STR"
end
def STR1
...
end
def STR2
...
end
...
end
can the STR* functions be generated on the fly, based on the value of
@name?
class Myclass
def initialize()
@name = "STR"
end
def STR1
...
end
def STR2
...
end
...
end
can the STR* functions be generated on the fly, based on the value of
@name?