るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.166秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:r[x] > クエリ:ruby[x] > クエリ:string[x] > クエリ:@[x] > クラス:Pathname[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

キーワード

検索結果

Pathname#binread(*args) -> String | nil (6215.0)

IO.binread(self.to_s, *args)と同じです。

...IO.binread(self.to_s, *args)と同じです。

//emlist[例][ruby]{
r
equire "pathname"

pathname
= Pathname("testfile")
pathname
.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname
.binread(20) # => "This is line one\nThi"
pathname
.binread(2...
...0, 10) # => "ne one\nThis is line "
//}

@
see IO.binread...

Pathname#sub(pattern) {|matched| ... } -> Pathname (144.0)

self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。

... Pathname オブジェクトを生成し、返します。

@
param pattern 置き換える文字列のパターンを指定します。

@
param replace pattern で指定した文字列と置き換える文字列を指定します。

//emlist[例][ruby]{
r
equire 'pathname'

path1 = Pathname('/usr/bi...
...n/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}

@
see String#sub...

Pathname#sub(pattern, replace) -> Pathname (144.0)

self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。

... Pathname オブジェクトを生成し、返します。

@
param pattern 置き換える文字列のパターンを指定します。

@
param replace pattern で指定した文字列と置き換える文字列を指定します。

//emlist[例][ruby]{
r
equire 'pathname'

path1 = Pathname('/usr/bi...
...n/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}

@
see String#sub...