[#29170] Call for Papers Linux Conference 2001 — akira yamada / やまだあきら <akira@...>

18 messages 2001/04/10
[#30213] Re: Call for Papers Linux Conference 2001 — akira yamada / やまだあきら <akira@...> 2001/06/13

[#29190] Time Stamp Copy of File.copy — "たけ(tk)" <ggb03124@...>

 ftools.rb の move では utime を行っていて日付が同じになりますが、copy

42 messages 2001/04/11
[#29193] Re: Time Stamp Copy of File.copy — matz@... (Yukihiro Matsumoto) 2001/04/11

まつもと ゆきひろです

[#29201] Re: Time Stamp Copy of File.copy — " たけ (tk)" <ggb03124@...> 2001/04/11

たけ(tk)です。

[#29203] Re: Time Stamp Copy of File.copy — WATANABE Hirofumi <eban@...> 2001/04/11

わたなべです.

[#29212] Re: Time Stamp Copy of File.copy — Minero Aoki <aamine@...> 2001/04/12

あおきです。

[#29215] Re: Time Stamp Copy of File.copy — " たけ (tk)" <ggb03124@...> 2001/04/12

たけ(tk)です。

[#29220] Re: Time Stamp Copy of File.copy — Minero Aoki <aamine@...> 2001/04/12

あおきです。

[#29234] Re: Time Stamp Copy of File.copy — " たけ (tk)" <ggb03124@...> 2001/04/13

たけ(tk)です。

[#29236] Re: Time Stamp Copy of File.copy — matz@... (Yukihiro Matsumoto) 2001/04/13

まつもと ゆきひろです

[#29238] Array#include! — " たけ (tk)" <ggb03124@...> 2001/04/13

たけ(tk)です。

[#29244] Re: Array#include! — matz@... (Yukihiro Matsumoto) 2001/04/13

まつもと ゆきひろです

[#29348] Open3 — NISHIO Mizuho <mzh@...>

どうも西尾です。

16 messages 2001/04/20

[#29397] rnet.rb 〜高レベルネットライブラリ〜 — rubikitch <rubikitch@...>

るびきちです。

11 messages 2001/04/24

[ruby-list:29060] Re: forwardable-1.0 release

From: Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
Date: 2001-04-02 16:24:12 UTC
List: ruby-list #29060
Toshです。

In message "[ruby-list:29057] Re: forwardable-1.0 release"
    on 01/04/02, 石塚圭樹 <keiju@ishitsuka.com> writes:
>けいじゅ@日本ラショナルソフトウェアです.

>>>|早速ですけど、Ruby本体のアーカイブに入るのを希望します。
>>>英語のドキュメント。
>>
>>Toshのいんちき英語程度でよろしければ遠からぬうちに用意します。
>
>そういう人がいてくれると嬉しいなぁ(^^;;; ということで, お願いします.

とりあえず書いてみましたので、後ろにつけておきます。
日本語版の対訳になっていないのは仕様です。(^^;;
意味はそんなに遠くはずれていたりはしないはずです。たぶん。

# 英語のまともなひとのレビューを希望。

それと日本語版の方のインデントをちょっと修正しました。これも
後ろにつけておきます。

あと、ちょっと気になったのですが、
Forwardableの方では「モジュール メソッド」
SingleForwardableの方では「メソッド」となっているのはあえて使い分け
ているのでしょうか?

>= Forwardable
>
>クラスに対しメソッドの委譲機能を定義します.
(...)
>== モジュールメソッド
(...)
>= SingleForwardable
>
>オブジェクトに対し, メソッドの委譲機能を定義します.
(...)
>== メソッド

---
Tosh
Toshiro Kuwabara


  -- forwardable.rb
                                                  $Release Version: 1.0 $
                                                  $Revision: 1.2 $
                                                  $Date: 1999/12/01 03:28:01 $

= Forwardable

a Module to define delegations for selected methods to a class.

== Usage

Using through extending the class.
  
  class Foo
    extend Forwardable

    def_delegators("@out", "printf", "print")
    def_delegators(:@in, :gets)
    def_delegator(:@contents, :[], "content_at")
  end
  f = Foo.new
  f.printf ...
  f.gets
  f.content_at(1)

== Methods

--- Forwardable#def_instance_delegators(accessor, *methods)

      adding the delegations for each method of ((|methods|)) to accessor.

--- Forwardable#def_instance_delegator(accessor, method, ali = method)
      
      adding the delegation for ((|method|)) to accessor. When you give
      optional argument ali, ali is used as the name of the delegation
      method, instead of ((|method|)).

--- Forwardable#def_delegators(accessor, *methods)

      the alias of Forwardable#def_instance_delegators.

--- Forwardable#def_delegator(accessor, method, ali = method)
      
      the alias of Forwardable#def_instance_delegator.

= SingleForwardable

a Module to define delegations for selected methods to an object.

== Usage

Using through extending the object.

  g = Goo.new
  g.extend SingleForwardable
  g.def_delegator("@out", :puts)
  g.puts ...

== Methods

--- SingleForwardable#def_singleton_delegators(accessor, *methods)

      adding the delegations for each method of ((|methods|)) to accessor.

--- SingleForwardable#def_singleton_delegator(accessor, method, ali = method)

      adding the delegation for ((|method|)) to accessor. When you give
      optional argument ali, ali is used as the name of the delegation
      method, instead of ((|method|)).

--- SingleForwardable#def_delegators(accessor, *methods)

      the alias of SingleForwardable#def_instance_delegators.

--- SingleForwardable#def_delegator(accessor, method, ali = method)

      the alias of SingleForwardable#def_instance_delegator.

  -- forwatable.rb
                                                  $Release Version: 1.0 $
                                                  $Revision: 1.2 $
                                                  $Date: 1999/12/01 03:28:01 $

= Forwardable

クラスに対しメソッドの委譲機能を定義します.

== 使い方

クラスに対してextendして使います. 
  
  class Foo
    extend Forwardable

    def_delegators("@out", "printf", "print")
    def_delegators(:@in, :gets)
    def_delegator(:@contents, :[], "content_at")
  end
  f = Foo.new
  f.printf ...
  f.gets
  f.content_at(1)

== モジュールメソッド

--- Forwardable#def_instance_delegators(accessor, *methods)

      methodsで渡されたメソッドのリストをaccessorに委譲するようにします.

--- Forwardable#def_instance_delegator(accessor, method, ali = method)

      methodで渡されたメソッドをaccessorに委譲するようにします. aliが引数とし
      て渡されたときは, メソッドaliが呼ばれたときには, accessorに対しmethodを
      呼び出します.

--- Forwardable#def_delegators(accessor, *methods)

      Forwardable#def_instance_delegatorsの別名です.

--- Forwardable#def_delegator(accessor, method, ali = method)

      Forwardable#def_instance_delegatorの別名です.

= SingleForwardable

オブジェクトに対し, メソッドの委譲機能を定義します.

== 使い方

オブジェクトに対してextendして使います. 

  g = Goo.new
  g.extend SingleForwardable
  g.def_delegator("@out", :puts)
  g.puts ...

== メソッド

--- SingleForwardable#def_singleton_delegators(accessor, *methods)

      methodsで渡されたメソッドのリストをaccessorに委譲するようにします.

--- SingleForwardable#def_singleton_delegator(accessor, method, ali = method)

      methodで渡されたメソッドをaccessorに委譲するようにします. aliが引数とし
      て渡されたときは, メソッドaliが呼ばれたときには, accessorに対しmethodを
      呼び出します.

--- SingleForwardable#def_delegators(accessor, *methods)

      SingleForwardable#def_singleton_delegatorsの別名です.

--- SingleForwardable#def_delegator(accessor, method, ali = method)

      SingleForwardable#def_singleton_delegatorの別名です.

In This Thread