Avoiding exposure of the old method can also be achieved by making it private.
And people who cursed me and tried repeatedly to be off-topic by
pointing me to the other users, to whom I am not familiarized with
anyway instead.
people here have very bad conception,they did have time to get busy with
bad discussions.
I'd be careful about making statements about people's perceptions.
After all, you get to know them only through *your* perception.
Usually it is much more successful to listen carefully to feedback and
take it as fact instead of claiming it's the others who do not see
reality. I don't have the time to go into more detail but the concept
of "reality" is actually quite a complex one and there are various
theories around that. I personally find this one pretty convincing:
The interesting part is here:
Cheers
robert
···
On Thu, Feb 28, 2013 at 6:28 PM, Tukai Patra <lists@ruby-forum.com> wrote:
Surely the very last line of my session (which you neatly removed from your quote) is calling it 'from the outside of the class'?
···
On 28.02.2013 12:51, Tukai Patra wrote:
Alex Gutteridge wrote in post #1099529:
On 28.02.2013 12:34, Tukai Patra wrote:
old_show
Uh, yes you just call it, unless I totally misunderstand your question?
class Foo
def bar
puts "bar"
end
end
==>nil
class Foo
alias :baz :bar
def bar
puts "baz"
baz
end
end
in the above you put `baz` inside `bar`, thus you were able. I am
telling without putting it into any instance method, can we call it,from
the outside of the class?
The alias keywords creates a new instance method in the class, no
different (from the outside) than any other methods you define on it:
1.9.2p290 :001 > class Test
1.9.2p290 :002?> def m
1.9.2p290 :003?> end
1.9.2p290 :004?> end
=> nil
1.9.2p290 :006 > Test.instance_methods(false)
=> [:m]
1.9.2p290 :007 > class Test
1.9.2p290 :008?> alias :old_m :m
1.9.2p290 :009?> end
=> nil
1.9.2p290 :010 > Test.instance_methods(false)
=> [:m, :old_m]
Jesus.
···
On Thu, Feb 28, 2013 at 2:02 PM, Tukai Patra <lists@ruby-forum.com> wrote:
Alex Gutteridge wrote in post #1099529:
On 28.02.2013 12:34, Tukai Patra wrote:
Yes the below one I was looking for if possible or not. Can you explain
how does it possible? what internal task ruby did for that call?
Avoiding exposure of the old method can also be achieved by making it private.
And people who cursed me and tried repeatedly to be off-topic by
pointing me to the other users, to whom I am not familiarized with
anyway instead.
people here have very bad conception,they did have time to get busy with
bad discussions.
I'd be careful about making statements about people's perceptions.
After all, you get to know them only through *your* perception.
Usually it is much more successful to listen carefully to feedback and
take it as fact instead of claiming it's the others who do not see
reality. I don't have the time to go into more detail but the concept
of "reality" is actually quite a complex one and there are various
theories around that. I personally find this one pretty convincing: Constructivism (philosophy of science) - Wikipedia
Thanks for your github link. I explained my confusion above. And after
that I found the link I shared. That link and your link both proved
that,yes what I was looking for possible.
and please don't ask me as "Arup". My name is "Tukai".
Some people was barking there, let them bark. Might they had a dream
about such, and typed here also. I don't care at their barks.
But thanks to you and Robert and Jesús to share valuable in-formations.