るりまサーチ

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

別のキーワード

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

キーワード

検索結果

<< 1 2 3 ... > >>

Comparable#<(other) -> bool (21113.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が負の整数を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。

... <=> をもとにオブジェクト同士を比較します。
<
=> が負の整数を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。

@param other 自身と比較したいオブジェクトを指定します。
@raise ArgumentError <...
...=> が nil を返したときに発生します。

//emlist[例][ruby]{
1 < 1 # => false
1 < 2 # => true
//}...

Complex#<(other) -> bool (21101.0)

@undef

@undef

Module#<(other) -> bool | nil (18173.0)

比較演算子。self が other の子孫である場合、 true を返します。 self が other の先祖か同一のクラス/モジュールである場合、false を返します。

...す。

@param other 比較対象のモジュールやクラス

@raise TypeError other がクラスやモジュールではない場合に発生します。

//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
class Qux
end
p
Bar < Foo # => true
p
Baz < Bar #...
...=> true
p Baz < Foo # => true
p
Baz < Qux # => nil
p
Baz > Qux # => nil

p
Foo < Object.new # => in `<': compared with non class/module (TypeError)
//}...

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

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

...合成した Proc を返します。

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

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

@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) # => 36
//}

//emlist[call を定義し...
...anner
def self.call(str)
str.scan(/\w+/)
end
end

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

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

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

IPAddr#<<(num) -> IPAddr (9201.0)

ビットごとの左シフト演算により、新しい IPAddr オブジェクトを生成します。

...ビットごとの左シフト演算により、新しい IPAddr オブジェクトを生成します。

@param num 左シフトする桁数。...

絞り込み条件を変える

OpenSSL::BN#<<(other) -> OpenSSL::BN (9201.0)

自身を other ビット左シフトした値を返します。

...自身を other ビット左シフトした値を返します。

//emlist[][ruby]{
bn = 1.to_bn
p
p bn << 1 # => #<OpenSSL::BN 2>
p
p bn # => #<OpenSSL::BN 1>
//}

@param other シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#lshift!...

Pathname#<=>(other) -> -1 | 0 | 1 | nil (9119.0)

パス名を比較します。other と同じなら 0 を、ASCII順で self が大きい場合 は正、other が大きい場合は負を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

...
other は Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。

@param other 比較対象の Pathname オブ...
...ジェクトを指定します。

//emlist[例][ruby]{
require 'pathname'

p
Pathname.new("foo/bar") <=> Pathname.new("foo/bar")
p
Pathname.new("foo/bar") <=> Pathname.new("foo//bar")
p
Pathname.new("foo/../foo/bar") <=> Pathname.new("foo/bar")
# => 0
# 1
# -1
//}...

WEBrick::HTTPVersion#<=>(other) -> -1 | 0 | 1 | nil (9113.0)

自身と指定された other のバージョンを比較します。 自身が other より新しいなら 1、同じなら 0、古いなら -1 を返します。 比較できない場合に nil を返します。

...を返します。
比較できない場合に nil を返します。

@param other HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトか文字列を指定します。

require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p
v < '1.0' #=> false...

Gem::DependencyList#spec_predecessors -> Hash (9107.0)

@todo ???

...@todo ???

Return a hash of predecessors. <tt>result[spec]</tt> is an
Array of gemspecs that have a dependency satisfied by the named
spec....

RDoc::Parser#parse_files_matching(regexp) -> () (9107.0)

regexp で指定した正規表現にマッチするファイルを解析できるパーサとして、 自身を登録します。

...regexp で指定した正規表現にマッチするファイルを解析できるパーサとして、
自身を登録します。

@param regexp 正規表現を指定します。

新しいパーサを作成する時に使用します。

例:

class RDoc::Parser::Xyz < RDoc::Parser
p
arse_f...

絞り込み条件を変える

<< 1 2 3 ... > >>