[#11156] How to delete methods from superclass? — Clemens Hintze <c.hintze@...>

Hello,

25 messages 1998/12/01
[#11157] Re: How to delete methods from superclass? — matz@... (Yukihiro Matsumoto) 1998/12/01

Hi, Clemens.

[#11176] English List [Re: How to delete methods from superclass?] — gotoken@... (GOTO Kentaro) 1998/12/01

In message "[ruby-list:11157] Re: How to delete methods from superclass?"

[#11250] Ruby 用語集 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

25 messages 1998/12/08

[#11269] 京都 (Re: [ruby-dev:3789] Re: List()) — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

21 messages 1998/12/11
[#11299] Re: 京都 — MAEDA Shugo <shugo@...> 1998/12/12

前田です。

[#11393] mod_ruby — shugo@... (Shugo Maeda)

前田です。

28 messages 1998/12/21
[#11394] Re: mod_ruby — matz@... (Yukihiro Matsumoto) 1998/12/21

まつもと ゆきひろです

[#11398] Re: mod_ruby — shugo@... (Shugo Maeda) 1998/12/21

前田です。

[#11399] RE: mod_ruby — OZAWA Sakuro <crouton@...> 1998/12/21

さくです。

[#11408] Re: Be port — shugo@... (Shugo Maeda) 1998/12/22

前田です。

[#11464] ruby and IDE — Noritsugu Nakamura <nnakamur@...>

18 messages 1998/12/27
[#11465] goto (Re: ruby and IDE) — ttate@... 1998/12/27

立石です。

[ruby-list:11156] How to delete methods from superclass?

From: Clemens Hintze <c.hintze@...>
Date: 1998-12-01 07:21:16 UTC
List: ruby-list #11156
Hello,

first sorry, that I use English for that list. But I'am a German and I
don't speak Japanese very well (well, I don't speak it at all, except
some words ;-). 

As I am very interested in Ruby, and there is no other mailing list than
yours, I have to ask my question, which arise from time to time, here. I
hope that's okay for you all. I don't want to bother matz with every
simple question :-)

Well coming to my problem/question...

I have written some modules in Python. I want to rewrite them in Ruby,
and contribute them. Also I want to translate some Python modules to
Ruby, as I think they are very useful (BTW: Congratulations for the
translation of the sgmllib.py and htmllib.py, very nice).

Now I have a class which supports file locking via lockfiles
(filename+".lock"). As some modules (e.g. mailread.rb) assume, that a
real file would be derived from IO, I have to derive my LockedFile
class from IO too. But in real that is not necessary! (BTW: One
remark! As Ruby is typeless, I think it should not be necessary to
force any instance of type IO or subclass in such cases. I think in
OOP it should be taken as: If it behaves like a File, take it as File!
Regardless whether it is a Array or whatever!). Every method call which
LockedFile does not know, will be delegated to a composite @filep which
is a real File.

So now I have the necessity to remove all methods, coming from IO
without removing, of course, of LockedFile's own methods. I would like
to know a "automatic way" to do that.

Does anybody know such a way? 

But nevertheless I would propose to remove such requirements for
derivation from IO. It would make things much easier. And it is not
really necessary for a OOPS. The next module I want to translate is the
module StringIO from Python. I would not like to derive it from class
IO, as it has nothing to do with I/O. It only fakes things a little
bit. But with the current scheme, I have to derive it from IO :-(

What do you all thing?

Greetings,
Cle.

PS: Sorry about my lousy English.

In This Thread

Prev Next