54件ヒット
[1-54件を表示]
(0.073秒)
ライブラリ
- ビルトイン (24)
-
json
/ add / exception (12) - shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- Exception (24)
- LoadError (12)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
キーワード
- mkdir (18)
-
set
_ backtrace (12) -
to
_ json (12)
検索結果
先頭5件
-
LoadError
# path -> String | nil (18114.0) -
Kernel.#require や Kernel.#load に失敗したパスを返します。
...Kernel.#require や Kernel.#load に失敗したパスを返します。
begin
require 'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end
パスが定まらない場合は nil を返します。... -
Shell
# mkdir(*path) -> Array (114.0) -
Dir.mkdirと同じです。 (複数可)
...同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
re... -
Shell
:: CommandProcessor # mkdir(*path) -> Array (114.0) -
Dir.mkdirと同じです。 (複数可)
...同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
re... -
Shell
:: Filter # mkdir(*path) -> Array (114.0) -
Dir.mkdirと同じです。 (複数可)
...同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
re... -
Exception
# set _ backtrace(errinfo) -> nil | String | [String] (25.0) -
バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。
...は String の配列のいずれかを指定します。
//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
$!.backtrace # => ["/path/to/test.rb:5:in `rescue in <main>'", "/path/to/test.rb:2:in `<main>'"]
$!.set_backtrace(["dummy1", "dummy2"])
$!.back... -
Exception
# to _ json(*args) -> String (19.0) -
自身を JSON 形式の文字列に変換して返します。
...#to_json に渡されます。
//emlist[例][ruby]{
require "json/add/core"
begin
0/0
rescue => e
e.to_json # => "{\"json_class\":\"ZeroDivisionError\",\"m\":\"divided by 0\",\"b\":[\"/path/to/test.rb:4:in `/'\",\"/path/to/test.rb:4:in `<main>'\"]}"
end
//}
@see JSON::Generator::GeneratorMeth...