321件ヒット
[1-100件を表示]
(0.133秒)
別のキーワード
種類
- インスタンスメソッド (237)
- 特異メソッド (46)
- モジュール関数 (27)
- 文書 (11)
ライブラリ
- ビルトイン (122)
- csv (22)
- dbm (11)
- gdbm (11)
- matrix (11)
-
minitest
/ unit (1) - pathname (8)
- pp (11)
- readline (11)
-
rexml
/ document (22) -
rexml
/ parsers / pullparser (11) -
rubygems
/ package / tar _ header (11) - sdbm (11)
- set (11)
- strscan (22)
- thread (2)
- thwait (12)
クラス
- Array (11)
-
CSV
:: Row (11) -
CSV
:: Table (11) - DBM (11)
- Dir (8)
- File (16)
- GDBM (11)
-
Gem
:: Package :: TarHeader (11) - Hash (11)
- Matrix (11)
- Object (11)
- Pathname (8)
-
REXML
:: Elements (11) -
REXML
:: Parsers :: PullParser (11) -
REXML
:: Text (11) - SDBM (11)
- Set (11)
- String (11)
- StringScanner (22)
- Symbol (11)
-
Thread
:: Queue (11) -
Thread
:: SizedQueue (7) - ThreadsWait (12)
モジュール
- FileTest (16)
- Kernel (11)
-
MiniTest
:: Assertions (1)
オブジェクト
- ENV (11)
-
Readline
:: HISTORY (11)
キーワード
-
assert
_ empty (1) - eos? (11)
-
next
_ wait (6) -
pretty
_ print _ cycle (11) - warn (11)
- zero? (16)
- 制御構造 (11)
検索結果
先頭5件
-
CSV
:: Table # empty? -> bool (21313.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 (21313.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 (21313.0) -
自身が :"" (length が 0 のシンボル)かどうかを返します。
...自身が :"" (length が 0 のシンボル)かどうかを返します。
:"".empty? #=> true
:foo.empty? #=> false
@see String#empty?... -
REXML
:: Elements # empty? -> bool (21301.0) -
子要素を持たない場合に true を返します。
子要素を持たない場合に true を返します。 -
REXML
:: Parsers :: PullParser # empty? -> bool (21301.0) -
未処理のイベントが残っていない場合に真を返します。
...未処理のイベントが残っていない場合に真を返します。
@see REXML::Parsers::PullParser#has_next?... -
REXML
:: Text # empty? -> bool (21301.0) -
テキストが空ならば真を返します。
テキストが空ならば真を返します。 -
File
. empty?(path) -> bool (21300.0) -
FileTest.#zero? と同じです。
...FileTest.#zero? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
FileTest
. # empty?(file) -> bool (21300.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?... -
Pathname
# empty? -> bool (18325.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'
Pathname("/usr/local").empty? # => false
Dir.mktmpdir { |dir| Pathname(dir).empty? } # => true
/....../}
//emlist[例 ファイルの場合][ruby]{
require "pathname"
require 'tempfile'
Pathname("testfile").empty? # => false
Tempfile.create("tmp") { |tmp| Pathname(tmp).empty? } # => true
//}
@see Dir.empty?, FileTest.#empty?, Pathname#zero?... -
String
# empty? -> bool (18319.0) -
文字列が空 (つまり長さ 0) の時、真を返します。
...文字列が空 (つまり長さ 0) の時、真を返します。
//emlist[例][ruby]{
"hello".empty? #=> false
" ".empty? #=> false
"".empty? #=> true
//}...