るりまサーチ

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

別のキーワード

  1. _builtin empty?
  2. dbm empty?
  3. csv empty?
  4. set empty?
  5. gdbm empty?

ライブラリ

クラス

モジュール

オブジェクト

キーワード

検索結果

<< < 1 2 3 4 5 > >>

SDBM#empty? -> bool (18101.0)

データベースが空の時、真を返します。

データベースが空の時、真を返します。

StringScanner#empty? -> bool (18101.0)

スキャンポインタが文字列の末尾を指しているなら true を、 末尾以外を指しているなら false を返します。

...by]{
require 'strscan'

s = StringScanner.new('test string')
s.eos? # => false
s.scan(/\w+/)
s.scan(/\s+/)
s.scan(/\w+/)
s.eos? # => true
//}

StringScanner#empty? は将来のバージョンで削除される予定です。
代わりに StringScanner#eos? を使ってください。...

Thread::SizedQueue#empty? -> bool (18101.0)

キューが空の時、真を返します。

キューが空の時、真を返します。

DBM#empty?() -> bool (18100.0)

データベースが空の時、真を返します。

データベースが空の時、真を返します。

Dir.empty?(path_name) -> bool (18100.0)

path_name で与えられたディレクトリが空の場合に真を返します。 ディレクトリでない場合や空でない場合に偽を返します。

...す。
ディレクトリでない場合や空でない場合に偽を返します。

//emlist[例][ruby]{
Dir.empty?('.') #=> false
Dir.empty?(IO::NULL) #=> false
require 'tmpdir'
Dir.mktmpdir { |dir| Dir.empty?(dir) } #=> true
//}

@param path_name 確認したいディレクトリ名。...

絞り込み条件を変える

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

FileTest.#zero? と同じです。

FileTest.#zero? と同じです。

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

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

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

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

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

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

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

StringScanner#eos? -> bool (3001.0)

スキャンポインタが文字列の末尾を指しているなら true を、 末尾以外を指しているなら false を返します。

...by]{
require 'strscan'

s = StringScanner.new('test string')
s.eos? # => false
s.scan(/\w+/)
s.scan(/\s+/)
s.scan(/\w+/)
s.eos? # => true
//}

StringScanner#empty? は将来のバージョンで削除される予定です。
代わりに StringScanner#eos? を使ってください。...

File.zero?(path) -> bool (3000.0)

FileTest.#zero? と同じです。

FileTest.#zero? と同じです。

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

FileTest.#zero?(file) -> bool (3000.0)

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

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

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

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

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

絞り込み条件を変える

net/pop (18.0)

このライブラリは、POP3 (Post Office Protocol version 3) を 用いてPOPサーバからメールを受信する機能を提供するライブラリです。

...t/pop'

pop = Net::POP3.new('pop.example.com', 110)
pop.start('YourAccount', 'YourPassword') # POPのセッションを開始
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx| # 各メッセージにアクセスする
File.open("inbox/#{i...
...す。

require 'net/pop'

Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
pop.mails.each_with_index do |m, idx|
File.open("inbox/#{idx + 1}", 'w') {|f|
f.writ...
...す。

require 'net/pop'

Net::POP3.start('pop.example.com', 110,
'YourAccount', 'YourPassword') {|pop|
if pop.mails.empty?
$stderr.puts 'no mail.'
else
i = 0
pop.delete_all do |m|
File.open("inbox/#{i}", 'w') {|f|
f.write m.pop...

Kernel.#warn(*message) -> nil (6.0)

message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。

...てから出力します。

このメソッドは以下と同じです。

//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}

@param message 出力するオブジェクトを任意個指定します。
@raise IOError 標準エラー出力が書き込み用にオ...

Kernel.#warn(*message, uplevel: nil) -> nil (6.0)

message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。

...指定しない場合は、
このメソッドは以下と同じです。

//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}

@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイル...
<< < 1 2 3 4 5 > >>