るりまサーチ

最速Rubyリファレンスマニュアル検索!
2562件ヒット [201-300件を表示] (0.078秒)

別のキーワード

  1. fileutils rm
  2. fileutils rm_r
  3. fileutils rm_f
  4. fileutils rm_rf
  5. un rm

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Syslog::Logger#formatter=(formatter) (6201.0)

ログを出力する際に使用するフォーマッターをセットします。

...するフォーマッターをセットします。

@param formatter 4 つの引数 (severity, time, program name, message) を
受け取る call メソッドを 持つオブジェクトを指定します。

引数 formatter が持つ call メソッドは以下の 4 つの引数 (...
...ッセージが記録された時刻を表す Time オブジェクト。

: progname

無視されます。互換性のために用意されています。

: message

記録するメッセージ。

call メソッドは文字列を返す必要があります。

@see Syslog::Logger#formatter...

Kernel#rm_f(*files) -> () (6130.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) -> () (6130.0)

FileUtils.#rm_rf のラッパーメソッドです。

...FileUtils.#rm_rf のラッパーメソッドです。

@param files ファイルのリストか、Dir.globで利用できる glob パターンを指定します。
最後の要素が Hash の場合は FileUtils.#rm_f の第二引数になります。

@see FileUtils.#rm_rf, Dir.glob...

Pathname#rmtree -> nil (6123.0)

FileUtils.rm_r(self.to_s) と同じです。

...FileUtils.rm_r(self.to_s) と同じです。


@see FileUtils.#rm_r...

Array#permutation(n = self.length) -> Enumerator (6101.0)

サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。

...permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permu...
...ation of length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result...
...<< e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}

@see Array#combination, Array#repeated_permutation...

絞り込み条件を変える

Array#permutation(n = self.length) { |p| block } -> self (6101.0)

サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。

...permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permu...
...ation of length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}

ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result...
...<< e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}

@see Array#combination, Array#repeated_permutation...

Array#repeated_permutation(n) -> Enumerator (6101.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...ated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one permutatio...
...ロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}

@see Array#repeated_combination, Array#permutation...

Array#repeated_permutation(n) { |p| ... } -> self (6101.0)

サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。

...ated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one permutatio...
...ロックを実
行して self を返します。

//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}

@see Array#repeated_combination, Array#permutation...

Benchmark::Tms#format(fmtstr = nil, *args) -> String (6101.0)

self を指定されたフォーマットで整形して返します。

...self を指定されたフォーマットで整形して返します。

このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。

: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y...
...:Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label

@param fmtstr フォーマット文字列です。
省略された場合は、Benchmark::Tms::FORMAT が使用されます。
@param args フォーマットされる引数です。...
<< < 1 2 3 4 5 ... > >>