種類
- モジュール関数 (8)
- インスタンスメソッド (8)
検索結果
先頭5件
-
Kernel
# rm -> () (54343.0) -
ファイルやディレクトリを削除します。
ファイルやディレクトリを削除します。
ruby -run -e rm -- [OPTION] FILE
-f 存在しないファイルを無視します
-r ディレクトリを再帰的にたどってファイルやディレクトリを削除します
-v 詳細表示
@see rm(1) -
Kernel
. # format(format , *arg) -> String (18604.0) -
format 文字列を C 言語の sprintf と同じように解釈し、 引数をフォーマットした文字列を返します。
...トした文字列を返します。
@param format フォーマット文字列です。
@param arg フォーマットされる引数です。
@see Kernel.#printf,Time#strftime,Date.strptime
=== sprintf フォーマット
Ruby の sprintf フォーマットは基本的に C 言語の sprintf(3)......tf("%p", /e+/) #=> "/e+/"
//}
: d
: i
引数の数値を10進表現の整数として出力します。
引数が整数でなければ関数 Kernel.#Integer と同じ規則で整数に
変換されます。
//emlist[][ruby]{
p sprintf("%d", -1) #=> "-1"
p sprintf("%d", 3.1) #=> "3"
p sprint... -
Kernel
# rm _ f(*files) -> () (18391.0) -
FileUtils.#rm_f のラッパーメソッドです。
FileUtils.#rm_f のラッパーメソッドです。
@param files ファイルのリストか、Dir.globで利用できる glob パターンを指定します。
最後の要素が Hash の場合は FileUtils.#rm_f の第二引数になります。
@see FileUtils.#rm_f, Dir.glob -
Kernel
# rm _ rf(*files) -> () (18391.0) -
FileUtils.#rm_rf のラッパーメソッドです。
FileUtils.#rm_rf のラッパーメソッドです。
@param files ファイルのリストか、Dir.globで利用できる glob パターンを指定します。
最後の要素が Hash の場合は FileUtils.#rm_f の第二引数になります。
@see FileUtils.#rm_rf, Dir.glob -
Kernel
# rmdir -> () (18304.0) -
空のディレクトリを削除します。
空のディレクトリを削除します。
ruby -run -e rmdir -- [OPTION] DIR
-p DIR で指定されたディレクトリとその上位ディレクトリを削除します
-v 詳細表示
@see rmdir(1) -
Kernel
. # sprintf(format , *arg) -> String (9304.0) -
format 文字列を C 言語の sprintf と同じように解釈し、 引数をフォーマットした文字列を返します。
...トした文字列を返します。
@param format フォーマット文字列です。
@param arg フォーマットされる引数です。
@see Kernel.#printf,Time#strftime,Date.strptime
=== sprintf フォーマット
Ruby の sprintf フォーマットは基本的に C 言語の sprintf(3)......tf("%p", /e+/) #=> "/e+/"
//}
: d
: i
引数の数値を10進表現の整数として出力します。
引数が整数でなければ関数 Kernel.#Integer と同じ規則で整数に
変換されます。
//emlist[][ruby]{
p sprintf("%d", -1) #=> "-1"
p sprintf("%d", 3.1) #=> "3"
p sprint... -
Kernel
# message(format , *arg) -> nil (304.0) -
Kernel.#printf と同じように標準出力にメッセージを出力します。 メッセージ出力後すぐに IO#flush します。
...
Kernel.#printf と同じように標準出力にメッセージを出力します。
メッセージ出力後すぐに IO#flush します。
$VERBOSE が真のときは何もしません。
@param format フォーマット文字列です。
@param arg フォーマットされる引数です。......@see Kernel.#printf... -
Kernel
# scanf(format) -> Array (304.0) -
STDIN.scanf と同じです。 IO#scanf、Stdin#scanfも参照してください。
STDIN.scanf と同じです。
IO#scanf、Stdin#scanfも参照してください。
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
@see IO#scanf, Stdin#scanf -
Kernel
# scanf(format) {|*ary| . . . } -> Array (304.0) -
STDIN.scanf と同じです。 IO#scanf、Stdin#scanfも参照してください。
STDIN.scanf と同じです。
IO#scanf、Stdin#scanfも参照してください。
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
@see IO#scanf, Stdin#scanf -
Kernel
. # open(file , mode _ enc = "r" , perm = 0666) -> IO (304.0) -
file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。
file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。
ブロックが与えられた場合、指定されたファイルをオープンし、
生成した IO オブジェクトを引数としてブロックを実行します。
ブロックの終了時や例外によりブロックを脱出するとき、
ファイルをクローズします。ブロックを評価した結果を返します。
ファイル名 file が `|' で始まる時には続く文字列をコマンドとして起動し、
コマンドの標準入出力に対してパイプラインを生成します
ファイル名が "|-" である時、open は Ruby の子プロセス
を生成し、その子プロセスとの間のパイプ(IOオブジェクト)を... -
Kernel
. # open(file , mode _ enc = "r" , perm = 0666) {|io| . . . } -> object (304.0) -
file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。
file をオープンして、IO(Fileを含む)クラスのインスタンスを返します。
ブロックが与えられた場合、指定されたファイルをオープンし、
生成した IO オブジェクトを引数としてブロックを実行します。
ブロックの終了時や例外によりブロックを脱出するとき、
ファイルをクローズします。ブロックを評価した結果を返します。
ファイル名 file が `|' で始まる時には続く文字列をコマンドとして起動し、
コマンドの標準入出力に対してパイプラインを生成します
ファイル名が "|-" である時、open は Ruby の子プロセス
を生成し、その子プロセスとの間のパイプ(IOオブジェクト)を... -
Kernel
. # open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO | Tempfile | IO (304.0) -
name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
...ock) のように name の open メソッドが呼ばれます。
これ以外の場合は、name はファイル名として扱われ、従来の
Kernel.#open(name, *rest) が呼ばれます。
ブロックを与えた場合は上の場合と同様、name が http:// や ftp:// で
始まって......ram mode モードを文字列で与えます。Kernel.#open と同じです。
@param perm open(2) の第 3 引数のように、ファイルを生成する場合のファイルのパーミッションを
整数で指定します。Kernel.#open と同じです
@param options ハッシ... -
Kernel
. # open(name , mode = & # 39;r& # 39; , perm = nil , options = {}) {|ouri| . . . } -> object (304.0) -
name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトまたは Tempfile オブジェクトとして返します。 返されるオブジェクトは OpenURI::Meta モジュールで extend されています。
...ock) のように name の open メソッドが呼ばれます。
これ以外の場合は、name はファイル名として扱われ、従来の
Kernel.#open(name, *rest) が呼ばれます。
ブロックを与えた場合は上の場合と同様、name が http:// や ftp:// で
始まって......ram mode モードを文字列で与えます。Kernel.#open と同じです。
@param perm open(2) の第 3 引数のように、ファイルを生成する場合のファイルのパーミッションを
整数で指定します。Kernel.#open と同じです
@param options ハッシ... -
Kernel
. # printf(format , *arg) -> nil (304.0) -
C 言語の printf と同じように、format に従い引数を文字列に変 換して port に出力します。
...out に出力します。
引数を 1 つも指定しなければ何もしません。
Ruby における format 文字列の拡張については
Kernel.#sprintfの項を参照してください。
@param port 出力先になるIO のサブクラスのインスタンスです。
@param format フ......011 ' 123'"
printf("%1$*2$s %2$d %1$s", "hello", 8) #=> " hello 8 hello"
printf("%1$*2$s %2$d", "hello", -8) #=> "hello -8"
printf("%+g:% g:%-g", 1.23, 1.23, 1.23) #=> "+1.23: 1.23:1.23"
printf("%u", -123) #=> "..4294967173"
//}
@see Kernel.#sprintf,IO#printf... -
Kernel
. # printf(port , format , *arg) -> nil (304.0) -
C 言語の printf と同じように、format に従い引数を文字列に変 換して port に出力します。
...out に出力します。
引数を 1 つも指定しなければ何もしません。
Ruby における format 文字列の拡張については
Kernel.#sprintfの項を参照してください。
@param port 出力先になるIO のサブクラスのインスタンスです。
@param format フ......011 ' 123'"
printf("%1$*2$s %2$d %1$s", "hello", 8) #=> " hello 8 hello"
printf("%1$*2$s %2$d", "hello", -8) #=> "hello -8"
printf("%+g:% g:%-g", 1.23, 1.23, 1.23) #=> "+1.23: 1.23:1.23"
printf("%u", -123) #=> "..4294967173"
//}
@see Kernel.#sprintf,IO#printf... -
Kernel
# task(*args) { . . . } -> Rake :: Task (22.0) -
Rake タスクを定義します。
Rake タスクを定義します。
@param args タスク名と依存タスクを指定します。
例:
task :clobber => [:clean] do
rm_rf "html"
end
@see Rake::Task.define_task