るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Pathname#to_s -> String (21316.0)

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

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


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

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

Thread::Backtrace::Location#to_s -> String (18328.0)

self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。

...mlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end

# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}...

Pathname#to_path -> String (9326.0)

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

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


@see Pathname#to_s...

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

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

@see IO.write...

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

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

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

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

path
name = Pathname("testfile")
path
name.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
path
name.binread(20) # => "This is line one\nThi"
path
name.binread(20...

絞り込み条件を変える

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

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

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


@see IO.binwrite...

Pathname#extname -> String (3219.0)

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

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


@see File.extname...

Pathname#ftype -> String (3219.0)

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

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


@see File.ftype...

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

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

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


@see IO.read...
<< 1 2 > >>