るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.055秒)
トップページ > クエリ:d[x] > クエリ:instance_delegate[x]

別のキーワード

  1. csv instance
  2. forwardable instance_delegate
  3. prime instance
  4. _builtin instance_eval
  5. syslog instance

ライブラリ

モジュール

検索結果

Forwardable#instance_delegate(hash) -> () (21201.0)

メソッドの委譲先を設定します。

...列で指定します。


例:

require 'forwardable'
class Zap
extend Forwardable
d
elegate :length => :@str
d
elegate [:first, :last] => :@arr
d
ef initialize
@arr = %w/foo bar baz/
@str = "world"
end
end

zap = Zap.new
zap.length # => 5
zap.first...

Forwardable#delegate(hash) -> () (6101.0)

メソッドの委譲先を設定します。

...列で指定します。


例:

require 'forwardable'
class Zap
extend Forwardable
d
elegate :length => :@str
d
elegate [:first, :last] => :@arr
d
ef initialize
@arr = %w/foo bar baz/
@str = "world"
end
end

zap = Zap.new
zap.length # => 5
zap.first...