563件ヒット
[1-100件を表示]
(0.111秒)
ライブラリ
クラス
- Array (11)
- DBM (11)
-
Encoding
:: Converter (22) - GDBM (11)
- Hash (57)
- Method (11)
- Object (11)
- Pathname (33)
-
REXML
:: Child (11) -
REXML
:: Parent (11) -
Rake
:: FileList (44) - SDBM (11)
- Set (11)
- String (253)
- StringScanner (11)
- UnboundMethod (11)
-
YAML
:: DBM (11)
モジュール
- Kernel (22)
キーワード
- arity (22)
- encode (33)
- freeze (11)
- gsub (55)
- gsub! (55)
- merge (22)
- merge! (12)
-
pathmap
_ replace (11) -
replace
_ child (11) -
replace
_ with (11) - replacement (11)
- replacement= (11)
- string (11)
- sub (66)
- sub! (44)
-
sub
_ ext (11) - timeout (22)
- tr (11)
- tr! (11)
-
tr
_ s (11) -
tr
_ s! (11) - update (12)
検索結果
先頭5件
-
DBM
# replace(other) -> self (18114.0) -
self の内容を other の内容で置き換えます。
...6, DBM::NEWDB)
db2[:bb] = 'bbb'
db2[:cc] = 'ccc'
p db1.keys #=> ['b', 'a']
db1.replace(db2)
p db1.keys #=> ['bb', 'cc']
p db2.keys #=> ['bb', 'cc']
hash = {'x' => 'xxx', 'y' => 'yyy' }
p db1 #=> #<DBM:0xb7c7eb08>
p db1.replace(hash) #=> #<DBM:0xb7c7eb08>... -
GDBM
# replace(other) -> self (18114.0) -
self の内容を other の内容で置き換えます。
...1['a'] = 'aaa'
db1['b'] = 'bbb'
db2 = GDBM.open('bbb.gdbm', 0666, GDBM::NEWDB)
db2['c'] = 'ccc'
db2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'yyy'}
p db1 #=> #<GDBM:0xb7d1c8a8>
p db1.replace(db2) #=> #<GDBM:0xb7d1c8a8>
p db1.replace(hash) #=> #<GDBM:0xb7d1c8a8>... -
Hash
# replace(other) -> self (18114.0) -
ハッシュの内容を other の内容で置き換えます。
...y]{
foo = {1 => 'a', 2 => 'b'}
bar = {2 => 'B', 3 => 'C'}
foo.replace(bar)
p foo #=> {2=>"B", 3=>"C"}
zoo = {}
zoo = bar.dup
p zoo #=> {2=>"B", 3=>"C"}
class Foo
def to_hash
{:japan => 'kyoto'}
end
end
h = Hash.new
h.replace(Foo.new) #暗黙の変換
p h #=> {:japan=>"kyoto"}
//}
@see... -
SDBM
# replace(other) -> self (18114.0) -
self の内容を other の内容で置き換えます。
...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"}... -
Array
# replace(another) -> self (18108.0) -
配列の内容を配列 another の内容で置き換えます。
...よる暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.replace [4, 5, 6]
p a #=> [4, 5, 6]
//}... -
Set
# replace(enum) -> self (18108.0) -
集合の要素をすべて削除し、enum で与えられた要素に置き換えます。
...納するオブジェクトを指定します。
@raise ArgumentError 引数 enum に each メソッドが定義されていない場合に
発生します。
//emlist[][ruby]{
require 'set'
p s = Set[10, 20, 30] # => #<Set: {10, 20, 30}>
s.replace([15, 25])
p s # => #<Set: {15, 25}>
//}... -
String
# replace(other) -> String (18108.0) -
self の内容を other の内容で置き換えます。
...self の内容を other の内容で置き換えます。
//emlist[例][ruby]{
str = "foo"
str.replace "bar"
p str # => "bar"
//}... -
YAML
:: DBM # replace(other) -> YAML :: DBM (18102.0) -
self の内容を other の内容で置き換えます。
self の内容を other の内容で置き換えます。
@param other Hash、DBM オブジェクトを指定します。
@raise DBMError 更新に失敗した場合に発生します。
自身を返します。 -
REXML
:: Parent # replace _ child(to _ replace , replacement) -> () (6331.0) -
子ノード列上の to_replace を replacement に置き換えます。
...子ノード列上の to_replace を replacement に置き換えます。
to_replace の parent は nil に、
replacement の parent は selfに変更されます。
@param to_replace 置き換え元のノード
@param replacement 置き換え先のノード... -
REXML
:: Child # replace _ with(child) -> self (6108.0) -
親ノードの子ノード列上において、 self を child に置き換えます。
...親ノードの子ノード列上において、 self を child に置き換えます。
@param child 置き換え後のノード
@see REXML::Parent#replace_child...