I have problems when aliasing modules methods like: Module.method(For example: Input.press? or Audio.bgm_play)
I try something like:
That throws me a Syntax Error on the line: "alias aliasing_input_press Input.press?"
And if I do:
It throw me an "no method press? for Input::Module" error.
And:
Throws me a Syntax error.
What shall I do?
I try something like:
Code:
module Input
alias aliasing_input_press Input.press?
def Input.press?(args)
aliasing_input_press(args)
end
end
And if I do:
Code:
module Input
alias aliasing_input_press press?
def press?(args) # or def Input. press?
aliasing_input_press(args)
end
end
And:
Code:
module Input
alias_method(aliasing_input_press, Input.press?)
def Input.press?
aliasing_input_press(args)
end
end
What shall I do?