るりまサーチ

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

別のキーワード

  1. _builtin call
  2. fiddle call
  3. method call
  4. formatter call
  5. continuation call

ライブラリ

モジュール

検索結果

<< < 1 2 3 4 5 ... > >>

OpenSSL::SSL::SSLContext#verify_callback=(proc) (6101.0)

検証をフィルタするコールバックを設定します。

...検証をフィルタするコールバックを設定します。

OpenSSL::X509::Store#verify_callback= と同じ働きをします。

コールバックには Proc や Method を渡します。

渡されたコールバックオブジェクトは証明書チェインの検証時に
チェイン...
...nil を設定するとデフォルトのコールバック(単に第一引数をそのまま返すだけ)
が使われます。

初期状態は nil です。

@param proc 設定する Proc オブジェクト
@see OpenSSL::SSL::SSLContext#verify_callback,
OpenSSL::X509::Store#verify_callback=...

OpenSSL::X509::Store#verify_callback -> Proc | nil (6101.0)

オブジェクトに設定されている検証をフィルタするコールバックを 返します。

...オブジェクトに設定されている検証をフィルタするコールバックを
返します。

デフォルトのコールバックが設定されている場合には nil を返します。

@see OpenSSL::X509::Store#verify_callback=...

OpenSSL::X509::Store#verify_callback=(proc) (6101.0)

検証をフィルタするコールバックを設定します。

...ォルトのコールバック(単に第一引数をそのまま返すだけ)
が使われます。

初期状態は nil です。

@param proc 設定する Proc オブジェクト
@see OpenSSL::X509::Store#verify_callback,
OpenSSL::X509::Store#verify,
OpenSSL::X509::StoreContext#verify...

SystemCallError#errno -> Integer | nil (3001.0)

レシーバに対応するシステム依存のエラーコードを返します。

...Errno::ENOENT => err
p err.errno # => 2
p Errno::ENOENT::Errno # => 2
end

begin
raise SystemCallError, 'message'
rescue SystemCallError => err
p err.errno # => nil
end


なお、例外を発生させずにエラーコードを得るに...

Method#<<(callable) -> Proc (131.0)

self と引数を合成した Proc を返します。

...まず受け取った引数を callable に渡して呼び出し、
その戻り値を self に渡して呼び出した結果を返します。

Method#>> とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジ...
...f(x)
x * x
end

def g(x)
x + x
end

# (3 + 3) * (3 + 3)
p (method(:f) << method(:g)).call(3) # => 36
//}

//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end

File.write('testfile', <<~TEXT)
Hello, World!
He...

絞り込み条件を変える

Method#>>(callable) -> Proc (131.0)

self と引数を合成した Proc を返します。

...数を self に渡して呼び出し、
その戻り値を callable に渡して呼び出した結果を返します。

Method#<< とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。

//emlist[...
...f(x)
x * x
end

def g(x)
x + x
end

# (3 * 3) + (3 * 3)
p (method(:f) >> method(:g)).call(3) # => 18
//}

//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end

File.write('testfile', <<~TEXT)
Hello, World!
He...

Proc#<<(callable) -> Proc (131.0)

self と引数を合成した Proc を返します。

...、まず受け取った引数を callable に渡して呼び出し、
その戻り値を self に渡して呼び出した結果を返します。

Proc#>> とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブ...
...][ruby]{
f = proc { |x| x * x }
g = proc { |x| x + x }

# (3 + 3) * (3 + 3)
p (f << g).call(3) # => 36
//}

//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end

File.write('testfile', <<~TEXT)
Hello, World!
Hell...
...o, Ruby!
TEXT

pipeline = proc { |data| puts "word count: #{data.size}" } << WordScanner << File.method(:read)
pipeline.call('testfile') # => word count: 4
//}

@see Method#<<, Method#>>...

Proc#>>(callable) -> Proc (131.0)

self と引数を合成した Proc を返します。

...数を self に渡して呼び出し、
その戻り値を callable に渡して呼び出した結果を返します。

Proc#<< とは呼び出しの順序が逆になります。

@param callable Proc、Method、もしくは任意の call メソッドを持ったオブジェクト。

//emlist[例...
...][ruby]{
f = proc { |x| x * x }
g = proc { |x| x + x }

# (3 * 3) + (3 * 3)
p (f >> g).call(3) # => 18
//}

//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end

File.write('testfile', <<~TEXT)
Hello, World!
Hell...
...o, Ruby!
TEXT

pipeline = proc { |fname| File.read(fname) } >> WordScanner >> method(:p)
pipeline.call('testfile') # => ["Hello", "World", "Hello", "Ruby"]
//}

@see Method#<<, Method#>>...

MiniTest::Assertions#skip(message = nil, backtrace = caller) (101.0)

このメソッドを呼び出したテストメソッドをスキップします。

...ップします。

@param message メッセージを指定します。

@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。

@raise MiniTest::Skip 必ず発生します。

@see Kerne...

Module#ruby2_keywords(method_name, ...) -> nil (33.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.

...s 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 spe...
...cial
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.

Th...
...s it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to this method before calling
it. Also, be aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.

//emlist[...

絞り込み条件を変える

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

...oc 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 specia...
...l 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.

This s...
...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. Also, be aware that if this method is removed, the behavior of the
proc will change so that it does not pass through keywords.

//emlist[][...

Method#curry -> Proc (31.0)

self を元にカリー化した Proc を返します。

...f.method(:foo).curry
proc2 = proc.call(1, 2) #=> #<Proc>
proc2.call(3) #=> [1,2,3]

def vararg(*args)
args
end

proc = self.method(:vararg).curry(4)
proc2 = proc.call(:x) #=> #<Proc>
proc3 = proc2.call(:y, :z) #=> #<Proc>
proc3.call(:a) #=> [:x, :y, :z,...

Method#curry(arity) -> Proc (31.0)

self を元にカリー化した Proc を返します。

...f.method(:foo).curry
proc2 = proc.call(1, 2) #=> #<Proc>
proc2.call(3) #=> [1,2,3]

def vararg(*args)
args
end

proc = self.method(:vararg).curry(4)
proc2 = proc.call(:x) #=> #<Proc>
proc3 = proc2.call(:y, :z) #=> #<Proc>
proc3.call(:a) #=> [:x, :y, :z,...
<< < 1 2 3 4 5 ... > >>