るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

クラス

キーワード

検索結果

<< < ... 94 95 96 >>

REXML::Child#previous_sibling=(other) (113.0)

other を self の前の隣接ノードとします。

...ther を self の前の隣接ノードとします。

つまり、親ノードが持つ子ノード列の self の前に
other を挿入します。

@
param other 挿入するノード

//emlist[][ruby]{
require
'rexml/document'

a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element...
....new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d

p a.to_s # => "<a><d/><b/><c/></a>"
//}...

SDBM#replace(other) -> self (113.0)

self の内容を other の内容で置き換えます。

...self の内容を other の内容で置き換えます。

@
param other each_pair メソッドを持つオブジェクトでなければなりません。

require
'sdbm'

db1 = SDBM.open('aaa.gdbm', 0666)
db1['a'] = 'aaa'
db1['b'] = 'bbb'
db1['c'] = 'ccc'
db2 = SDBM.open('bbb.gdbm',...
...p db1 #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"a"=>"aaa", "b"=>"bbb", "c"=>"ccc"}
p db1.replace(db2) #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"c"=>"ccc", "d"=>"ddd"}
p db1.replace(hash) #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"x"=>"xxx", "y"=>"yyy"}...

Shell#echo(*strings) -> Shell::Filter (113.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...Filter オブジェクトを返します.

@
param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require
'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(f...
...ile).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}...

Shell#foreach(path = nil, &block) -> () (113.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。

@
param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require
'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){...
...|f|
puts f
}...

Shell::CommandProcessor#echo(*strings) -> Shell::Filter (113.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...Filter オブジェクトを返します.

@
param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require
'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(f...
...ile).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}...

絞り込み条件を変える

Shell::CommandProcessor#foreach(path = nil, &block) -> () (113.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。

@
param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require
'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){...
...|f|
puts f
}...

URI::Generic#coerce(oth) -> [URI, URI] (113.0)

引数 oth をパースして [パース後の oth, self] の配列を返します。

...数 oth をパースして [パース後の oth, self] の配列を返します。

@
param oth URI オブジェクトか文字列を指定します。

例:

require
'uri'

uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
# => [#<URI::HTTP:0x00000000bcb028 URL:http://foo...
....com/>, #<URI::HTTP:0x00000000d92178 URL:http://my.example.com>]...

Enumerable#all? -> bool (25.0)

すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。

...べての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。

ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが...
... true を返します。

@
param pattern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require
'set'

# すべて正の数か?
p Set[5, 6, 7].all? {|v| v > 0 } # => true
p Set[5, -1, 7].all? {|v| v > 0 } # => false
p Set[]....
...all? {|v| v > 0 } # => true

p Set['ant', 'bear', 'cat'].all?(/t/) # => false
p (1..4).all?(Integer) # => true
p [1, 2, 3].all?(Integer) # => true
p [1, 2, 3.0].all?(Integer) # => false
# Hashは[k, v]のペアなのでArray/Hash === [k, v]で評...

Enumerable#one? -> bool (25.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...す。

@
param pattern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require
'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear...
...', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one?...
...# => false
//}

@
see Array#one?...

Enumerable#one? {|obj| ... } -> bool (25.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...す。

@
param pattern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require
'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear...
...', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one?...
...# => false
//}

@
see Array#one?...

絞り込み条件を変える

Enumerable#all? -> bool (19.0)

すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。

...べての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。

ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが...
... true を返します。

@
param pattern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require
'set'

# すべて正の数か?
p Set[5, 6, 7].all? {|v| v > 0 } # => true
p Set[5, -1, 7].all? {|v| v > 0 } # => false
p Set[]....
...all? {|v| v > 0 } # => true

p Set['ant', 'bear', 'cat'].all?(/t/) # => false
p (1..4).all?(Integer) # => true
p [1, 2, 3].all?(Integer) # => true
p [1, 2, 3.0].all?(Integer) # => false
# Hashは[k, v]のペアなのでArray/Hash === [k, v]で評...

Enumerable#one? -> bool (19.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...す。

@
param pattern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require
'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear...
...', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one?...

Enumerable#one? {|obj| ... } -> bool (19.0)

ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。

...す。

@
param pattern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require
'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear...
...', 'cat'].one?(/t/) # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one?...
<< < ... 94 95 96 >>