るりまサーチ

最速Rubyリファレンスマニュアル検索!
317件ヒット [1-100件を表示] (0.120秒)
トップページ > クエリ:l[x] > クエリ:>[x] > クエリ:p[x] > クエリ:empty?[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. complex >
  4. module >
  5. integer >

ライブラリ

クラス

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

REXML::Parsers::PullParser#empty? -> bool (30401.0)

未処理のイベントが残っていない場合に真を返します。

...未処理のイベントが残っていない場合に真を返します。

@see REXML::Parsers::PullParser#has_next?...

CSV::Table#empty? -> bool (27425.0)

ヘッダーを除いて、データがないときに true を返します。

...ーを除いて、データがないときに true を返します。

Array#empty? に委譲しています。

//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b\n", headers: true)
table = csv.read
p
table.empty? # => true
table << [1, 2]
p
table.empty? # => false
//}

@see Array#empty?...

Readline::HISTORY.empty? -> bool (27425.0)

ヒストリに格納された内容の数が 0 の場合は true を、 そうでない場合は false を返します。

...リに格納された内容の数が 0 の場合は true を、
そうでない場合は false を返します。

例:

require "readline"

p
Readline::HISTORY.empty? #=> true
Readline::HISTORY.push("foo", "bar", "baz")
p
Readline::HISTORY.empty? #=> false

@see Readline::HISTORY.length...

Symbol#empty? -> bool (27413.0)

自身が :"" (length が 0 のシンボル)かどうかを返します。

...自身が :"" (length が 0 のシンボル)かどうかを返します。

:"".empty? #=> true
:foo.empty? #=> false

@see String#empty?...

REXML::Elements#empty? -> bool (27401.0)

子要素を持たない場合に true を返します。

子要素を持たない場合に true を返します。

絞り込み条件を変える

REXML::Text#empty? -> bool (27401.0)

テキストが空ならば真を返します。

テキストが空ならば真を返します。

File.empty?(path) -> bool (27400.0)

FileTest.#zero? と同じです。

...FileTest.#zero? と同じです。

@param path パスを表す文字列か IO オブジェクトを指定します。...

FileTest.#empty?(file) -> bool (27400.0)

ファイルが存在して、そのサイズが 0 である時に真を返します。 そうでない場合、あるいはシステムコールに失敗した場合には false を返します。

...は false を返します。

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

//emlist[例:][ruby]{
IO.write("zero.txt", "")
FileTest.zer...
...o?("zero.txt") # => true
IO.write("nonzero.txt", "1")
FileTest.zero?("nonzero.txt") # => false
//}

@see FileTest.#size, FileTest.#size?...

ThreadsWait#empty? -> bool (24431.0)

同期されるスレッドが存在するならば true をかえします。

...ッドが存在するならば true をかえします。

使用例
require 'thwait'

threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}

thall = ThreadsWait.new
p
thall.threads.empty? #=> true
thall.join(*threads)
p
thall.threads.empty? #=> false...

Array#empty? -> bool (24425.0)

自身の要素の数が 0 の時に真を返します。そうでない場合に false を返します。

...自身の要素の数が 0 の時に真を返します。そうでない場合に false を返します。

//emlist[例][ruby]{
p
[].empty? #=> true
p
[1, 2, 3].empty? #=> false
//}...

絞り込み条件を変える

Pathname#empty? -> bool (24425.0)

ディレクトリに対しては Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。

...は Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。

//emlist[例 ディレクトリの場合][ruby]{
require "pathname"
require 'tmpdir'

P
athname("/usr/local").empty? # => false
Dir.mktmpdir { |dir| Pathname(dir).empty? } # => true
/...
.../}

//emlist[例 ファイルの場合][ruby]{
require "pathname"
require 'tempfile'

P
athname("testfile").empty? # => false
Tempfile.create("tmp") { |tmp| Pathname(tmp).empty? } # => true
//}

@see Dir.empty?, FileTest.#empty?, Pathname#zero?...
<< 1 2 3 ... > >>