G
Galevsky Gal
Hi all,
here is my problem: I would like to handle class instances into a module
included by the class. This case is illustrated below:
module Mod
instanceOfClas = ???
method_HelloWorld = instanceOfClas.method('helloWorld')
# do something with the method that could be:
method_HelloWorld.call if iwant
end
class Clas
include Mod
def helloWorld
"Hello world !"
end
end
Do you have any idea ? I cannot get my instance using self since self
means the module itself. How can I make a .call onto *parent* class
method ?
Many thanks for your support,
Gal'
here is my problem: I would like to handle class instances into a module
included by the class. This case is illustrated below:
module Mod
instanceOfClas = ???
method_HelloWorld = instanceOfClas.method('helloWorld')
# do something with the method that could be:
method_HelloWorld.call if iwant
end
class Clas
include Mod
def helloWorld
"Hello world !"
end
end
Do you have any idea ? I cannot get my instance using self since self
means the module itself. How can I make a .call onto *parent* class
method ?
Many thanks for your support,
Gal'