るりまサーチ

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

キーワード

検索結果

<< 1 2 3 ... > >>

Gem::SourceInfoCache#latest_cache_data -> Hash (18301.0)

最新のキャッシュデータを返します。

最新のキャッシュデータを返します。

Shell::CommandProcessor#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (18230.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...nel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param fi...
...le1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] #...
...=> true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15230.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...nel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param fi...
...le1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] #...
...=> true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::Filter#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15230.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...nel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@param fi...
...le1 文字列でファイルへのパスを指定します。

@param file2 文字列でファイルへのパスを指定します。

require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] #...
...=> true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Gem::SourceInfoCache#latest_cache_file -> String (15201.0)

使用可能な最新のキャッシュファイル名を返します。

...のキャッシュファイル名を返します。

システムキャッシュが使用可能な場合はシステムキャッシュのファイル名を返します。
そうでない場合はユーザーキャッシュのファイル名を返します。

@see Gem::SourceInfoCache#cache_file...

絞り込み条件を変える

Gem::SourceInfoCache#latest_system_cache_file -> String (15201.0)

最新のシステムキャッシュのファイル名を返します。

最新のシステムキャッシュのファイル名を返します。

Gem::SourceInfoCache#latest_user_cache_file -> String (15201.0)

最新のユーザーキャッシュのファイル名を返します。

最新のユーザーキャッシュのファイル名を返します。

MiniTest::Unit::TestCase#passed? -> bool (15101.0)

自身の実行に成功した場合は真を返します。 そうでない場合は偽を返します。

自身の実行に成功した場合は真を返します。
そうでない場合は偽を返します。

Exception#backtrace_locations -> [Thread::Backtrace::Location] (12431.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...on#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.n...
..., month, -1).day == 31
raise "#{month} is not long month"
end

def get_exception
return begin
yield
rescue => e
e
end
end

e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:in `get_...
...exception'", "test.rb:15:in `<main>'"]
//}

@see Exception#backtrace...

Logger#datetime_format=(format) (12325.0)

ログに記録する時の日付のフォーマットをセットします。

...new(STDOUT)

logger.datetime_format # => nil
logger.debug("test")
logger.datetime_format = '%Y/%m/%dT%H:%M:%S.%06d' # => "%Y/%m/%dT%H:%M:%S.%06d"
logger.datetime_format # => "%Y/%m/%dT%H:%M:%S.%06d"
logger.debug("test")

# => D, [2019-03-13T23:52:13.674385 #17393] DEBUG -- : test
# D, [2019/03/13...
...T23:52:13.000012#17393] DEBUG -- : test
//}

@see Time#strftime, Logger#datetime_format...

絞り込み条件を変える

Logger#datetime_format -> String | nil (12225.0)

ログに記録する時の日付のフォーマットです。

...gger.datetime_format # => nil
logger.debug("test")
logger.datetime_format = '%Y/%m/%dT%H:%M:%S.%06d'
logger.datetime_format # => "%Y/%m/%dT%H:%M:%S.%06d"
logger.debug("test")

# => D, [2019-03-12T22:52:13.674385 #17393] DEBUG -- : test
# D, [2019/03/12T22:52:13.000012#17393] DEBUG -- : test
//}...
...@see Time#strftime, Logger#datetime_format=...
<< 1 2 3 ... > >>