るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. string []=
  2. string slice
  3. string []
  4. string slice!
  5. string gsub!

ライブラリ

キーワード

検索結果

Net::FTP::MLSxEntry#pathname -> String (54610.0)

パス名を返します。

パス名を返します。

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

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

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

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

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

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

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

@se...

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

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

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

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

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

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

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

@se...

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

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

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

//emlist[例][ruby]{
require "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(20, 10) # => ...

Pathname#to_path -> String (51373.0)

File.open などの引数に渡す際に呼ばれるメソッドです。 Pathname オブジェ クトにおいては、 to_s と同じです。

File.open などの引数に渡す際に呼ばれるメソッドです。 Pathname オブジェ
クトにおいては、 to_s と同じです。


@see Pathname#to_s

絞り込み条件を変える

Pathname#to_s -> String (51343.0)

パス名を文字列で返します。

パス名を文字列で返します。


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

path = Pathname.new("/tmp/hogehoge")
File.open(path)
//}

Pathname#write(string, offset=nil, **opts) -> Integer (51325.0)

IO.write(self.to_s, string, offset, **opts)と同じです。

@see IO.write

Pathname#binwrite(string, offset=nil) -> Integer (51307.0)

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

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


@see IO.binwrite

Pathname#extname -> String (51307.0)

File.extname(self.to_s) と同じです。

File.extname(self.to_s) と同じです。


@see File.extname

Pathname#ftype -> String (51307.0)

File.ftype(self.to_s) と同じです。

File.ftype(self.to_s) と同じです。


@see File.ftype

絞り込み条件を変える

Pathname#read(*args) -> String | nil (51307.0)

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

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


@see IO.read

Pathname#readlines(*args) -> [String] (51307.0)

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

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


@see IO.readlines

Shell#split(pathname) -> [String] (628.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param pathname パス名を表す文字列を指定します。

@see File.split

Shell::CommandProcessor#split(pathname) -> [String] (628.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param pathname パス名を表す文字列を指定します。

@see File.split

Shell::Filter#split(pathname) -> [String] (628.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param pathname パス名を表す文字列を指定します。

@see File.split

絞り込み条件を変える