るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io readlines
  5. io each_line

キーワード

検索結果

<< 1 2 3 ... > >>

IO.sysopen(path, mode = "r", perm = 0666) -> Integer (21118.0)

path で指定されるファイルをオープンし、ファイル記述子を返しま す。

...path で指定されるファイルをオープンし、ファイル記述子を返しま
す。

IO
.for_fd などで IO オブジェクトにしない限り、このメソッ
ドでオープンしたファイルをクローズする手段はありません。

@param path ファイル名を表す...
...文字列を指定します。

@param mode モードを文字列か定数の論理和で指定します。Kernel.#open と同じです。

@param perm open(2) の第 3 引数のように、ファイルを生成する場合の
ファイルのパーミッションを整数で指定しま...

IO#printf(format, *arg) -> nil (21106.0)

C 言語の printf と同じように、format に従い引数 を文字列に変換して、self に出力します。

...じように、format に従い引数
を文字列に変換して、self に出力します。

第一引数に IO を指定できないこと、引数を省略できないことを除けば Kernel.#printf と同じです。

@param format Kernel.#printf と同じです。print_format を参照し...
...てください。

@param arg Kernel.#printf と同じです。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX 出力に失敗した場合に発生します。


@see Kernel.#printf...

IO#scanf(format) -> Array (21100.0)

String#scanfも参照してください。

...String#scanfも参照してください。

@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。...

IO#scanf(format) {|*ary| ...} -> Array (21100.0)

String#scanfも参照してください。

...String#scanfも参照してください。

@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。...

Gem::VersionOption#add_platform_option(task = command, *wrap) (18200.0)

option parser に対して --platform オプションを追加します。

...option parser に対して --platform オプションを追加します。

@param task コマンド名を指定します。デフォルト値はインクルードされる側のクラスで指定されます。

@param wrap Gem::Command#add_option に渡すその他のオプションを指定し...

絞り込み条件を変える

FileUtils.#rm(list, options = {}) -> () (15219.0)

list で指定された対象を消去します。

...は配列で指定します。

@param options :force, :noop, :verbose が指定できます。
c:FileUtils#options

//emlist[][ruby]{
require 'fileutils'
FileUtils.rm('junk.txt')
FileUtils.rm(Dir.glob('*~'))
FileUtils.rm('NotExistFile', force: true) # never raises exception
//}...

Gem::UserInteraction#terminate_interaction(*args) -> () (15200.0)

アプリケーションを終了します。

アプリケーションを終了します。

@param args 委譲先のメソッドに与える引数です。

Array#permutation(n = self.length) -> Enumerator (12200.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...
...tation 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| resul...
...t << 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 (12200.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...
...tation 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| resul...
...t << 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 (12200.0)

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

...d_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 permutation o...
...ロックを実
行して 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...

絞り込み条件を変える

<< 1 2 3 ... > >>