588件ヒット
[101-200件を表示]
(0.141秒)
ライブラリ
クラス
- Array (12)
- DBM (12)
-
Encoding
:: Converter (24) - GDBM (12)
- Hash (64)
- Method (12)
- Object (12)
- Pathname (36)
-
REXML
:: Child (12) -
REXML
:: Parent (12) -
Rake
:: FileList (48) - SDBM (12)
- Set (12)
- String (276)
- UnboundMethod (12)
-
YAML
:: DBM (12)
モジュール
- Kernel (8)
キーワード
- arity (24)
- encode (36)
- freeze (12)
- gsub (60)
- gsub! (60)
- merge (24)
- merge! (14)
-
pathmap
_ replace (12) -
replace
_ child (12) -
replace
_ with (12) - replacement (12)
- replacement= (12)
- sub (72)
- sub! (48)
-
sub
_ ext (12) - timeout (8)
- tr (12)
- tr! (12)
-
tr
_ s (12) -
tr
_ s! (12) - update (14)
検索結果
先頭5件
-
REXML
:: Parent # replace _ child(to _ replace , replacement) -> () (12631.0) -
子ノード列上の to_replace を replacement に置き換えます。
...子ノード列上の to_replace を replacement に置き換えます。
to_replace の parent は nil に、
replacement の parent は selfに変更されます。
@param to_replace 置き換え元のノード
@param replacement 置き換え先のノード... -
String
# pathmap _ replace(patterns) { . . . } -> String (12302.0) -
与えられたパスを前もって置き換えます。
...与えられたパスを前もって置き換えます。
@param patterns 'pat1,rep1;pat2,rep2;...' のような形式で置換パターンを指定します。... -
Encoding
:: Converter # replacement -> String (12213.0) -
変換器に設定されている置換文字を返します。
...器に設定されている置換文字を返します。
@return 変換器に設定されている置換文字
//emlist[][ruby]{
ec = Encoding::Converter.new("euc-jp", "us-ascii")
p ec.replacement #=> "?"
ec = Encoding::Converter.new("euc-jp", "utf-8")
p ec.replacement #=> "\uFFFD"
//}... -
Encoding
:: Converter # replacement=(string) (12213.0) -
置換文字を設定します。
...置換文字を設定します。
@param string 変換器に設定する置換文字
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace)
ec.replacement = "<undef>"
p ec.convert("a \u3042 b") #=> "a <undef> b"
//}... -
REXML
:: Child # replace _ with(child) -> self (12208.0) -
親ノードの子ノード列上において、 self を child に置き換えます。
...親ノードの子ノード列上において、 self を child に置き換えます。
@param child 置き換え後のノード
@see REXML::Parent#replace_child... -
Pathname
# sub(pattern , replace) -> Pathname (3308.0) -
self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。
...しい Pathname オブジェクトを生成し、返します。
@param pattern 置き換える文字列のパターンを指定します。
@param replace pattern で指定した文字列と置き換える文字列を指定します。
//emlist[例][ruby]{
require 'pathname'
path1 = Pathname('/......usr/bin/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}
@see String#sub... -
Pathname
# sub(pattern) {|matched| . . . } -> Pathname (3208.0) -
self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。
...しい Pathname オブジェクトを生成し、返します。
@param pattern 置き換える文字列のパターンを指定します。
@param replace pattern で指定した文字列と置き換える文字列を指定します。
//emlist[例][ruby]{
require 'pathname'
path1 = Pathname('/......usr/bin/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}
@see String#sub... -
Pathname
# sub _ ext(replace) -> Pathname (3208.0) -
拡張子を与えられた文字列で置き換えた Pathname オブジェクトを返します。
...列で置き換えた Pathname オブジェクトを返します。
自身が拡張子を持たない場合は、与えられた文字列を拡張子として付加します。
@param replace 拡張子を文字列で指定します。
//emlist[例][ruby]{
require "pathname"
Pathname('/usr/bin/sh......#<Pathname:/usr/bin/shutdown.rb>
Pathname('/home/user/test.txt').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
Pathname('/home/user/test').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
Pathname('/home/user/test.').sub_ext('.pdf') # => #<Pathname:/home/user/test..pdf>
Path......name('/home/user/.test').sub_ext('.pdf') # => #<Pathname:/home/user/.test.pdf>
Pathname('/home/user/test.tar.gz').sub_ext('.xz') # => #<Pathname:/home/user/test.tar.xz>
//}... -
Hash
# update(*others) -> self (3131.0) -
selfとothersのハッシュの内容を順番にマージ(統合)します。
...thers の値を使います。
othersがハッシュではない場合、othersのメソッドto_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ......, 4 => 'D'}
p foo.update(bar) #=> {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo #=> {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo.update(bar) {|key, foo_val, bar_val| foo_val + bar_val } # => {1=>"a", 2=>"BB", 3=>"CC", 4=>"DD"}
p foo # => {1=>"a", 2=>"BB", 3=>"CC", 4=>"DD"}
//}
@see Hash#merge,Hash#replace... -
Hash
# update(*others) {|key , self _ val , other _ val| . . . } -> self (3131.0) -
selfとothersのハッシュの内容を順番にマージ(統合)します。
...thers の値を使います。
othersがハッシュではない場合、othersのメソッドto_hashを使って暗黙の変換を試みます。
@param others マージ用のハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return マージ......, 4 => 'D'}
p foo.update(bar) #=> {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo #=> {1=>"a", 2=>"B", 3=>"C", 4=>"D"}
p foo.update(bar) {|key, foo_val, bar_val| foo_val + bar_val } # => {1=>"a", 2=>"BB", 3=>"CC", 4=>"DD"}
p foo # => {1=>"a", 2=>"BB", 3=>"CC", 4=>"DD"}
//}
@see Hash#merge,Hash#replace...