るりまサーチ

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

別のキーワード

  1. _builtin to_proc
  2. _builtin proc
  3. proc curry
  4. proc new
  5. kernel proc

ライブラリ

クラス

キーワード

検索結果

Proc#parameters -> [object] (62141.0)

Proc オブジェクトの引数の情報を返します。

...Proc オブジェクトの引数の情報を返します。

Proc
オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以下のような Symbol と、引数名を表す...
...ド引数
: :block
& で指定されたブロック引数

例:
prc = lambda{|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}
prc.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b

@see Method#parameters, UnboundMethod#parameters...

Method#parameters -> [object] (18131.0)

Method オブジェクトの引数の情報を返します。

...

例:
m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
File.method(:symlink).parameters #=> req

@see Proc#parameters...
...引数

例:
m = Class.new{define_method(:m){|x, y=42, *other, k_x:, k_y: 42, **k_other, &b|}}.instance_method(:m)
m.parameters #=> x], [:opt, :y], [:rest, :other], [:keyreq, :k_x], [:key, :k_y], [:keyrest, :k_other], [:block, :b
File.method(:symlink).parameters #=> req

@see Proc#parameters...

UnboundMethod#parameters -> [object] (18131.0)

UnboundMethod オブジェクトの引数の情報を返します。

...UnboundMethod オブジェクトの引数の情報を返します。

詳しくは Method#parameters を参照してください。



@see Proc#parameters, Method#parameters...

XMLRPC::BasicServer (18.0)

Is the base class for all XML-RPC server-types (CGI, standalone). You can add handler and set a default handler. Do not use this server, as this is/should be an abstract class.

...=== How the method to call is found

The arity (number of accepted arguments) of a handler (method or Proc object) is
compared to the given arguments submitted by the client for a RPC ((-Remote Procedure Call-)).
A handler is only called if it accepts the number of arguments, otherwise the search
f...
...er handler will go on. When at the end no handler was found,
the XMLRPC::BasicServer#set_default_handler will be called.
With this technique it is possible to do overloading by number of parameters, but
only for Proc handler, because you cannot define two methods of the same name in
the same class....

XMLRPC::BasicServer#set_service_hook(&handler) (18.0)

A service-hook is called for each service request (RPC). You can use a service-hook for example to wrap existing methods and catch exceptions of them or convert values to values recognized by XMLRPC. You can disable it by passing nil as parameter handler .

...s to values recognized by XMLRPC. You can disable it by passing nil as parameter
handler .

The service-hook is called with a Proc object and with the parameters for this Proc.
An example:

server.set_service_hook {|obj, *args|
begin
ret = obj.call(*args) # call the original service-...

絞り込み条件を変える