instance method Pathname#to_s
to_s -> String
to_str -> String
-
パス名を文字列で返します。
to_str は、File.open などの引数にそのまま Pathname オブジェクトを 渡せるようにするために用意されています。
require 'pathname' path = Pathname.new("/tmp/hogehoge") File.open(path)
class Pathname
to_s -> String
to_str -> String
パス名を文字列で返します。
to_str は、File.open などの引数にそのまま Pathname オブジェクトを 渡せるようにするために用意されています。
require 'pathname' path = Pathname.new("/tmp/hogehoge") File.open(path)