るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dh p=
  5. dh p

検索結果

<< < 1 2 3 >>

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (3119.0)

型が持つソースインターフェイスを取得します。

...PEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。

tobj = WIN32OLE_TYP...
...E.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]

WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたインターフェイスが選択されます。

次のサンプル...
...loopの呼び出しが必要な点に注意してください。
ここでは最終イベントのStatusTextChangeイベントのメッセージについては既
知としています。

# coding : cp932
require 'win32ole'

type = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'InternetExplo...

Proc#ruby2_keywords -> proc (3117.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.

...e 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 sp...
...f 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.

This should only be used for procs that delegate ke...
...another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Als...

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

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

...ドを呼び出せます。
d:spec/def#limit も参照してください。

p
ublic メソッドだけ呼び出せれば良い場合は
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() "baz" end
end

# 任意のキーとメソッド(の名前)の関係をハッシュに保持しておく
# レシーバの...
...ーバは任意(Foo クラスのインスタンスである必要もない)
p
Foo.new.send(methods[1]) # => "foo"
p
Foo.new.send(methods[2]) # => "bar"
p
Foo.new.send(methods[3]) # => "baz"
//}

@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method...

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

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

...ドを呼び出せます。
d:spec/def#limit も参照してください。

p
ublic メソッドだけ呼び出せれば良い場合は
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() "baz" end
end

# 任意のキーとメソッド(の名前)の関係をハッシュに保持しておく
# レシーバの...
...ーバは任意(Foo クラスのインスタンスである必要もない)
p
Foo.new.send(methods[1]) # => "foo"
p
Foo.new.send(methods[2]) # => "bar"
p
Foo.new.send(methods[3]) # => "baz"
//}

@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method...
<< < 1 2 3 >>