るりまサーチ

最速Rubyリファレンスマニュアル検索!
3252件ヒット [1901-2000件を表示] (0.037秒)
トップページ > クエリ:length[x]

別のキーワード

  1. _builtin length
  2. csv length
  3. dbm length
  4. set length
  5. rss length

オブジェクト

キーワード

検索結果

<< < ... 18 19 20 21 22 ... > >>

Enumerable#one? -> bool (12.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...ければ偽を返します。


//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one?...
...n === item を評価します。

//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one?...

Enumerable#one? {|obj| ... } -> bool (12.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...ければ偽を返します。


//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one?...
...n === item を評価します。

//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one?...

Enumerable#one?(pattern) -> bool (12.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...n === item を評価します。

//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one?...

Forwardable#delegate(hash) -> () (12.0)

メソッドの委譲先を設定します。

...uire 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end

zap = Zap.new
zap.length # => 5
zap.first # => "foo"
zap.last # => "baz"...

Forwardable#instance_delegate(hash) -> () (12.0)

メソッドの委譲先を設定します。

...uire 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr = %w/foo bar baz/
@str = "world"
end
end

zap = Zap.new
zap.length # => 5
zap.first # => "foo"
zap.last # => "baz"...

絞り込み条件を変える

JSON::State.new(options = {}) -> JSON::State (12.0)

自身を初期化します。

...、ASCII 文字列のみを用いて JSON 形式の文字列を生成します。
デフォルトは偽です。
: :buffer_initial_length
sets the initial length of the generator's internal buffer.

//emlist[例 Hash を指定][ruby]{
require "json"

json_state = JSON::State.new(indent: "\t")
js...

NEWS for Ruby 2.1.0 (12.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...います)
* RUBY_HEAP_MIN_SLOTS (RUBY_GC_HEAP_INIT_SLOTS を代わりに使います)

* Integer
* 追加: Fixnum#bit_length
* 追加: Bignum#bit_length
* Bignum の性能向上
* GMP をいくつかの操作で使えるときは使います。
乗算、除算、...

NEWS for Ruby 3.0.0 (12.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ws the help message via the pager designated by the value.
16754

=== `--backtrace-limit` option

The `--backtrace-limit` option limits the maximum length of a backtrace.
8661

== Core classes updates

Outstanding ones only.

* Array
* The following methods now return Array instances instead o...
...classes.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#integer?`, `#magnitude`, `#odd?`, `#ord`, `#to_i`, `#to_int`, `#zero?`
* `Struct`: reader methods for 10th or later members...

Range#max {|a, b| ... } -> object | nil (12.0)

ブロックの評価結果で範囲内の各要素の大小判定を行い、最大の要素を返しま す。範囲内に要素が存在しなければ nil を返します。

...の整数
を、期待しています。


@raise TypeError ブロックが整数以外を返したときに発生します。

@see Range#last, Range#min, Enumerable#max

//emlist[例][ruby]{
h = { 1 => "C", 2 => "Go", 3 => "Ruby" }
(1..3).max { |a, b| h[a].length <=> h[b].length } # => 3
//}...

Range#min {|a, b| ... } -> object | nil (12.0)

ブロックの評価結果で範囲内の各要素の大小判定を行い、最小の要素を返しま す。範囲内に要素が存在しなければ nil を返します。

...整数
を、期待しています。


@raise TypeError ブロックが整数以外を返したときに発生します。

@see Range#first, Range#max, Enumerable#min

//emlist[例][ruby]{
h = { 1 => "C", 2 => "Go", 3 => "Ruby" }
(1..3).min { |a, b| h[a].length <=> h[b].length } # => 1
//}...

絞り込み条件を変える

Range#minmax -> [object, object] (12.0)

範囲内の要素のうち、最小の要素と最大の要素を要素とするサイズ 2 の配列を返します。

...います。
ブロックの値は、a > b のとき正、 a == b のとき 0、a < b のとき負の整数を、期待しています。

//emlist[例][ruby]{
(1..3).minmax # => [1, 3]

h = { 1 => "C", 2 => "Go", 3 => "Ruby" }
(1..3).minmax { |a, b| h[a].length <=> h[b].length } # => [1, 3]
//}...

Range#minmax {|a, b| ... } -> [object, object] (12.0)

範囲内の要素のうち、最小の要素と最大の要素を要素とするサイズ 2 の配列を返します。

...います。
ブロックの値は、a > b のとき正、 a == b のとき 0、a < b のとき負の整数を、期待しています。

//emlist[例][ruby]{
(1..3).minmax # => [1, 3]

h = { 1 => "C", 2 => "Go", 3 => "Ruby" }
(1..3).minmax { |a, b| h[a].length <=> h[b].length } # => [1, 3]
//}...

Thread::Queue#clear -> () (12.0)

キューを空にします。返り値は不定です。

...キューを空にします。返り値は不定です。

//emlist[例][ruby]{
require 'thread'
q = Queue.new

[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }

q.length # => 4
q.clear
q.length # => 0
//}...
...キューを空にします。返り値は不定です。

//emlist[例][ruby]{
q = Queue.new

[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }

q.length # => 4
q.clear
q.length # => 0
//}...

cgi (12.0)

CGI プログラムの支援ライブラリです。

...CONTENT_LENGTH
* CONTENT_TYPE
* GATEWAY_INTERFACE
* PATH_INFO
* PATH_TRANSLATED
* QUERY_STRING
* REMOTE_ADDR
* REMOTE_HOST
* REMOTE_IDENT
* REMOTE_USER
* REQUEST_METHOD
* SCRIPT_NAME
* SERVER_NAME
* SERVER_PORT
* SERVER_PROTOCOL
* SERVER_SOFTWARE

#content_length と #s...
<< < ... 18 19 20 21 22 ... > >>