るりまサーチ

最速Rubyリファレンスマニュアル検索!
142件ヒット [1-100件を表示] (0.024秒)

別のキーワード

  1. rake empty_task_args
  2. closure args
  3. optparse args
  4. fiddle args
  5. parseerror args

ライブラリ

クラス

検索結果

<< 1 2 > >>

Object#send(name, *args) -> object (18304.0)

オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。

...クトのメソッド name を args を引数に
して呼び出し、メソッドの実行結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

send
が再定義された場合に備えて別名 __send__ も
用意されており、ラ...
..._send__ は再定義すべきではありません。

send
, __send__ は、メソッドの呼び出し制限
にかかわらず任意のメソッドを呼び出せます。
d:spec/def#limit も参照してください。

public メソッドだけ呼び出せれば良い場合は
Object#public_send...
...でしょう。

@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。

//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"


class Foo
def foo() "foo" end
def bar() "bar" end
def baz()...

Object#send(name, *args) { .... } -> object (18304.0)

オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。

...クトのメソッド name を args を引数に
して呼び出し、メソッドの実行結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

send
が再定義された場合に備えて別名 __send__ も
用意されており、ラ...
..._send__ は再定義すべきではありません。

send
, __send__ は、メソッドの呼び出し制限
にかかわらず任意のメソッドを呼び出せます。
d:spec/def#limit も参照してください。

public メソッドだけ呼び出せれば良い場合は
Object#public_send...
...でしょう。

@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。

//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"


class Foo
def foo() "foo" end
def bar() "bar" end
def baz()...

BasicObject#__send__(name, *args) -> object (6286.0)

オブジェクトのメソッド name を args を引数にして呼び出し、メソッドの結果を返します。

...name を args を引数にして呼び出し、メソッドの結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

@param name 呼び出すメソッドの名前。 Symbol または文字列で指定します。
@param args メソッ...
...ass Mail
def delete(*args)
"(Mail#delete) - delete " + args.join(',')
end
def send(name, *args)
"(Mail#send) - #{name} #{args.join(',')}"
end
end
mail = Mail.new
mail.send :delete, "gentle", "readers" # => "(Mail#send) - delete gentle,readers"
mail.__send__ :delete, "gentle", "...
...readers" # => "(Mail#delete) - delete gentle,readers"
//}

@see Object#send...

BasicObject#__send__(name, *args) { .... } -> object (6286.0)

オブジェクトのメソッド name を args を引数にして呼び出し、メソッドの結果を返します。

...name を args を引数にして呼び出し、メソッドの結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

@param name 呼び出すメソッドの名前。 Symbol または文字列で指定します。
@param args メソッ...
...ass Mail
def delete(*args)
"(Mail#delete) - delete " + args.join(',')
end
def send(name, *args)
"(Mail#send) - #{name} #{args.join(',')}"
end
end
mail = Mail.new
mail.send :delete, "gentle", "readers" # => "(Mail#send) - delete gentle,readers"
mail.__send__ :delete, "gentle", "...
...readers" # => "(Mail#delete) - delete gentle,readers"
//}

@see Object#send...

Object#public_send(name, *args) -> object (6250.0)

オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。

...ジェクトの public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}

@param name 文字列かS...
...ymbol で指定するメソッド名です。

@param args 呼び出すメソッドに渡す引数です。

@raise ArgumentError name を指定しなかった場合に発生します。

@raise NoMethodError protected メソッドや private メソッドに対して実行
...
...た場合に発生します。

//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}

@see BasicObject#__send__, Object#send...

絞り込み条件を変える

Object#public_send(name, *args) { .... } -> object (6250.0)

オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。

...ジェクトの public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}

@param name 文字列かS...
...ymbol で指定するメソッド名です。

@param args 呼び出すメソッドに渡す引数です。

@raise ArgumentError name を指定しなかった場合に発生します。

@raise NoMethodError protected メソッドや private メソッドに対して実行
...
...た場合に発生します。

//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}

@see BasicObject#__send__, Object#send...

ruby 1.9 feature (36.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

..._identity?

=== 2006-09-11

: Hash#identical
: Hash#identical?

=== 2006-08-31

: Array#shuffle
: Array#shuffle!

追加

=== 2006-07-26

: __send
: __send!

追加

: invoke_method
: invoke_functional_method

削除

=== 2006-07-21

: Module#attr

オプショナル引数の assignable が...
...\0b*") # => ["foo", "bar"]
p Dir.glob("{f*,b*}") # => ["foo", "bar"]

=== 2005-09-05
: fcall [new]

追加

=== 2005-08-30
: Object#send, Object#__send__ [ruby][change]
レシーバを指定した呼び出しではprivateメソッドを呼び出せなくなりました。

=== 2005-06-09...
...rimental]

以前のローカル変数に括弧を付けると call が呼び出される変更は取り消されて、
(({(expr)(args...)})) で (({expr.call(args...)})) が呼ばれるようになりました。
この機能は実験的なものです。

x = proc {|a| p a}
(x)(7) #...

Module#ruby2_keywords(method_name, ...) -> nil (34.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...ames, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the final hash argum...
...aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.

//emlist[例][ruby]{
module Mod
def foo(meth, *args, &block)
send
(:"do_#{meth}", *args, &block)
end
ruby2_keywords(:foo) if respond_to?(:ruby2_keywords, true)
end
//}...

Proc#ruby2_keywords -> proc (34.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

...Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked...
...so, be aware that if this method is removed, the behavior of the
proc will change so that it does not pass through keywords.

//emlist[][ruby]{
module Mod
foo = ->(meth, *args, &block) do
send
(:"do_#{meth}", *args, &block)
end
foo.ruby2_keywords if foo.respond_to?(:ruby2_keywords)
end
//}...

1.6.8から1.8.0への変更点(まとめ) (30.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...だろうけど)
* quo - もっとも正確に近い商
* divmod - 整除と剰余

=== NoMethodError

: ((<NoMethodError#args|NoMethodError/args>)) [new]

追加

=== Object

: ((<Object#initialize_copy|Object/initialize_copy>)) [change]

追加

このメソッドは in...
...[new]
: ((<UNIXSocket/UNIXSocket.socketpair>)) [new]
: ((<UNIXSocket#recv_io|UNIXSocket/recv_io>)) [new]
: ((<UNIXSocket#send_io|UNIXSocket/send_io>)) [new]

追加

: ((<UNIXServer#listen|UNIXServer/listen>)) [new]
: ((<TCPServer#listen|TCPServer/listen>)) [new]...
...りました。

=== その他

: ((<NameError/NameError.new>))(msg[, name]) [compat]
: ((<NoMethodError/NoMethodError.new>))(msg, name, args) [compat]
: ((<SystemCallError/SystemCallError.new>))(msg, err) [compat]
: ((<Errno::EXXX>)).new(msg) [compat]

...

絞り込み条件を変える

DRb::DRbProtocol (30.0)

drb で使われる通信プロトコルを取り扱うモジュールです。

...ります。

: send_request (ref, msg_id, arg, b)
ref で指定されているオブジェクトの msg_id で指定されているメソッドを
arg という引数と b というブロック付きで呼び出す、というリクエストを
送ります。DRbMessage#send_request を呼び...
...を受け取り
[object, message, args, block] という配列を返します。
DRbMessage#recv_request を呼び出してストリームから
メッセージを読み取る、というのが最も簡単な
このメソッドの実装法です。

: send_reply(succ, result)
クライア...
...ントにリプライを送る。 DRbMessage#send_reply を呼び出して
ストリームにメッセージを書き込む、というのが最も簡単な
このメソッドの実装法です。

: close
接続を閉じる...
<< 1 2 > >>