るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. rsa p

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 4 ... > >>

REXML::Parent#replace_child(to_replace, replacement) -> () (12631.0)

子ノード列上の to_replace を replacement に置き換えます。

...子ノード列上の to_replace replacement に置き換えます。

to_replace parent は nil に、
replace
ment の 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'

p
ath1 = Pathname('/...
...usr/bin/perl')
p
ath1.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'

p
ath1 = Pathname('/...
...usr/bin/perl')
p
ath1.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"

P
athname('/usr/bin/sh...
...#<Pathname:/usr/bin/shutdown.rb>
P
athname('/home/user/test.txt').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
P
athname('/home/user/test').sub_ext('.pdf') # => #<Pathname:/home/user/test.pdf>
P
athname('/home/user/test.').sub_ext('.pdf') # => #<Pathname:/home/user/test..pdf>
P
ath...
...name('/home/user/.test').sub_ext('.pdf') # => #<Pathname:/home/user/.test.pdf>
P
athname('/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...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>