るりまサーチ

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

別のキーワード

  1. argf.class lines
  2. argf.class each_line
  3. argf.class each
  4. argf.class readline
  5. argf.class readlines

ライブラリ

クラス

モジュール

オブジェクト

検索結果

<< < ... 13 14 15 >>

URI.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (12.0)

文字列から URL-encoded form data をデコードします。

...文字列から URL-encoded form data をデコードします。

application/x-www-form-urlencoded 形式のデータをデコードし、
[key, value] という形の配列の配列を返します。

enc で指定したエンコーディングの文字列が URL エンコードされたもの...
...#=> [['a', '1'], ['a', '2'], ['b', '3']]
p ary.assoc('a').last #=> '1'
p ary.assoc('b').last #=> '3'
p ary.rassoc('a').last #=> '2'
p Hash[ary] # => {"a"=>"2", "b"=>"3"}

@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str...

tsort (12.0)

tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

...と強連結成分に関するモジュールを提供します。

=== Example

//emlist[][ruby]{
require 'tsort'

class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end

{1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort
#=> [3,...
...nd

def build(target)
each_strongly_connected_component_from(target) {|ns|
if ns.length != 1
fs = ns.delete_if {|n| Array === n}
raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
end
n = ns.first
if Array === n
outputs, inputs, bloc...
...tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end

def command(arg)
print arg, "\n"
system arg
end

m = Make.new
m.rule(%w[t1]) { command 'date > t1' }
m.rule(%w[t2]) { command 'date > t2' }
m.rule(%w[t3]) { command 'date > t3' }
m.rule(%w[t4], %w[t1 t3]) { co...

ENV.filter -> Enumerator (4.0)

環境変数名と値についてブロックを評価し、真を返したものを集めたハッシュ を返します。

環境変数名と値についてブロックを評価し、真を返したものを集めたハッシュ
を返します。

ENV.select -> Enumerator (4.0)

環境変数名と値についてブロックを評価し、真を返したものを集めたハッシュ を返します。

環境変数名と値についてブロックを評価し、真を返したものを集めたハッシュ
を返します。
<< < ... 13 14 15 >>