るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

Pathname#to_s -> String (117340.0)

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

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


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

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

Pathname#basename(suffix = "") -> Pathname (63598.0)

Pathname.new(File.basename(self.to_s, suffix)) と同じです。

Pathname.new(File.basename(self.to_s, suffix)) と同じです。

@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。

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

Pathname("ruby/ruby.c").basename #=> #<Pathname:"ruby.c">
Pathname("ruby/ruby.c").basename("...

Pathname#each_entry {|pathname| ... } -> nil (63562.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。


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

Pathname("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (63508.0)

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

@param default_dir self が相対パスであれば default_dir を基準に展開されます。

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

path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_path # => #<Pathname:/path/to/testfile>
path.e...

Pathname#dirname -> Pathname (63454.0)

Pathname.new(File.dirname(self.to_s)) と同じです。

Pathname.new(File.dirname(self.to_s)) と同じです。

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

Pathname('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}

@see File.dirname

絞り込み条件を変える

Pathname#readlink -> Pathname (63400.0)

Pathname.new(File.readlink(self.to_s)) と同じです。

Pathname.new(File.readlink(self.to_s)) と同じです。


@see File.readlink

Pathname#find(ignore_error: true) {|pathname| ...} -> nil (63388.0)

self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。

self 配下のすべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。

require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}

と同じです。

ブロックを省略した場合は Enumerator を返します。

@param ignore_error 探索中に発生した例外を無視するかどうかを指定します。

@see Find.#find

Pathname#empty? -> bool (63223.0)

ディレクトリに対しては Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。

ディレクトリに対しては Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。

//emlist[例 ディレクトリの場合][ruby]{
require "pathname"
require 'tmpdir'

Pathname("/usr/local").empty? # => false
Dir.mktmpdir { |dir| Pathname(dir).empty? } # => true
//}

//emlist[例 ファイルの場合][ruby]{
require "path...

Pathname#each_line(*args) -> Enumerator (63193.0)

IO.foreach(self.to_s, *args, &block) と同じです。

IO.foreach(self.to_s, *args, &block) と同じです。

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

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}

//emlist[例 ブロックを指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\...

Pathname#each_line(*args) {|line| ... } -> nil (63193.0)

IO.foreach(self.to_s, *args, &block) と同じです。

IO.foreach(self.to_s, *args, &block) と同じです。

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

IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}

//emlist[例 ブロックを指定][ruby]{
require "pathname"

IO.write("testfile", "line1\nline2,\nline3\...

絞り込み条件を変える

Pathname#binread(*args) -> String | nil (63157.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#ctime -> Time (63157.0)

File.ctime(self.to_s) を渡したものと同じです。

File.ctime(self.to_s) を渡したものと同じです。

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

IO.write("testfile", "test")
pathname = Pathname("testfile")
pathname.ctime # => 2019-01-14 00:39:51 +0900
sleep 1
pathname.chmod(0755)
pathname.ctime # => 2019-01-14 00:39:52 +0900
//}

@see File.ctime

Pathname#split -> Array (63157.0)

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

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

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

pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split

Pathname#to_path -> String (63133.0)

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

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


@see Pathname#to_s

Pathname#atime -> Time (63121.0)

File.atime(self.to_s) を渡したものと同じです。

File.atime(self.to_s) を渡したものと同じです。

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

pathname = Pathname("testfile")
pathname.atime # => 2018-12-18 20:58:13 +0900
//}

@see File.atime

絞り込み条件を変える

Pathname#chown(owner, group) -> Integer (63121.0)

File.chown(owner, group, self.to_s) と同じです。

File.chown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。

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

Pathname('testfile').stat.uid # => 501
Pathname('testfile').chown(502, 12)
Pathname('testfile').stat.uid # => 502
//}

@see File.chown, File#chown

Pathname#find(ignore_error: true) -> Enumerator (63088.0)

self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。

self 配下のすべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。

require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}

と同じです。

ブロックを省略した場合は Enumerator を返します。

@param ignore_error 探索中に発生した例外を無視するかどうかを指定します。

@see Find.#find

Pathname#fnmatch(pattern, *args) -> bool (63085.0)

File.fnmatch(pattern, self.to_s, *args) と同じです。

File.fnmatch(pattern, self.to_s, *args) と同じです。

@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。

@param args File.fnmatch を参照してください。

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

path = Pathname("testfile")
path.fnmatch("test*") ...

Pathname#zero? -> bool (63067.0)

FileTest.zero?(self.to_s) と同じです。

FileTest.zero?(self.to_s) と同じです。


@see FileTest.#zero?
, Pathname#empty?

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

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

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


@see IO.binwrite

絞り込み条件を変える

Pathname#birthtime -> Time (63049.0)

File.birthtime(self.to_s) を渡したものと同じです。

File.birthtime(self.to_s) を渡したものと同じです。

@raise NotImplementedError Windows のような birthtime のない環境で発生します。


@see File.birthtime

Pathname#blockdev? -> bool (63049.0)

FileTest.blockdev?(self.to_s) と同じです。

FileTest.blockdev?(self.to_s) と同じです。


@see FileTest.#blockdev?

Pathname#chardev? -> bool (63049.0)

FileTest.chardev?(self.to_s) と同じです。

FileTest.chardev?(self.to_s) と同じです。


@see FileTest.#chardev?

Pathname#chmod(mode) -> Integer (63049.0)

File.chmod(mode, self.to_s) と同じです。

File.chmod(mode, self.to_s) と同じです。

@param mode ファイルのアクセス権限を整数で指定します。


@see File.chmod

Pathname#directory? -> bool (63049.0)

FileTest.directory?(self.to_s) と同じです。

FileTest.directory?(self.to_s) と同じです。


@see FileTest.#directory?

絞り込み条件を変える

Pathname#executable? -> bool (63049.0)

FileTest.executable?(self.to_s) と同じです。

FileTest.executable?(self.to_s) と同じです。


@see FileTest.#executable?

Pathname#executable_real? -> bool (63049.0)

FileTest.executable_real?(self.to_s) と同じです。

FileTest.executable_real?(self.to_s) と同じです。


@see FileTest.#executable_real?

Pathname#exist? -> bool (63049.0)

FileTest.exist?(self.to_s) と同じです。

FileTest.exist?(self.to_s) と同じです。


@see FileTest.#exist?

Pathname#extname -> String (63049.0)

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

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


@see File.extname

Pathname#file? -> bool (63049.0)

FileTest.file?(self.to_s) と同じです。

FileTest.file?(self.to_s) と同じです。


@see FileTest.#file?

絞り込み条件を変える

Pathname#fnmatch?(pattern, *args) -> bool (63049.0)

File.fnmatch?(pattern, self.to_s, *args) と同じです。

File.fnmatch?(pattern, self.to_s, *args) と同じです。

@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。

@param args File.fnmatch を参照してください。

@see File.fnmatch?

Pathname#ftype -> String (63049.0)

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

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


@see File.ftype

Pathname#grpowned? -> bool (63049.0)

FileTest.grpowned?(self.to_s) と同じです。

FileTest.grpowned?(self.to_s) と同じです。


@see FileTest.#grpowned?

Pathname#lchmod(mode) -> Integer (63049.0)

File.lchmod(mode, self.to_s) と同じです。

File.lchmod(mode, self.to_s) と同じです。

@param mode ファイルのアクセス権限を整数で指定します。


@see File.lchmod

Pathname#lchown(owner, group) -> Integer (63049.0)

File.lchown(owner, group, self.to_s) と同じです。

File.lchown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。


@see File.lchown

絞り込み条件を変える

Pathname#lstat -> File::Stat (63049.0)

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

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


@see File.lstat

Pathname#make_link(old) -> 0 (63049.0)

File.link(old, self.to_s) と同じです。

File.link(old, self.to_s) と同じです。


@see File.link

Pathname#make_symlink(old) -> 0 (63049.0)

File.symlink(old, self.to_s) と同じです。

File.symlink(old, self.to_s) と同じです。


@see File.symlink

Pathname#mkdir(*args) -> 0 (63049.0)

Dir.mkdir(self.to_s, *args) と同じです。

Dir.mkdir(self.to_s, *args) と同じです。


@see Dir.mkdir

Pathname#mkpath -> nil (63049.0)

FileUtils.mkpath(self.to_s) と同じです。

FileUtils.mkpath(self.to_s) と同じです。


@see FileUtils.#mkpath

絞り込み条件を変える

Pathname#mtime -> Time (63049.0)

File.mtime(self.to_s) を渡したものと同じです。

File.mtime(self.to_s) を渡したものと同じです。


@see File.mtime

Pathname#open(mode = &#39;r&#39;, perm = 0666) -> File (63049.0)

File.open(self.to_s, *args, &block) と同じです。

File.open(self.to_s, *args, &block) と同じです。


@see File.open

Pathname#open(mode = &#39;r&#39;, perm = 0666) {|file| ... } -> object (63049.0)

File.open(self.to_s, *args, &block) と同じです。

File.open(self.to_s, *args, &block) と同じです。


@see File.open

Pathname#opendir -> Dir (63049.0)

Dir.open(self.to_s, &block) と同じです。

Dir.open(self.to_s, &block) と同じです。


@see Dir.open

Pathname#opendir {|dir| ... } -> nil (63049.0)

Dir.open(self.to_s, &block) と同じです。

Dir.open(self.to_s, &block) と同じです。


@see Dir.open

絞り込み条件を変える

Pathname#owned? -> bool (63049.0)

FileTest.owned?(self.to_s) と同じです。

FileTest.owned?(self.to_s) と同じです。


@see FileTest.#owned?

Pathname#pipe? -> bool (63049.0)

FileTest.pipe?(self.to_s) と同じです。

FileTest.pipe?(self.to_s) と同じです。


@see FileTest.#pipe?

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

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

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


@see IO.read

Pathname#readable? -> bool (63049.0)

FileTest.readable?(self.to_s) と同じです。

FileTest.readable?(self.to_s) と同じです。


@see FileTest.#readable?

Pathname#readable_real? -> bool (63049.0)

FileTest.readable_real?(self.to_s) と同じです。

FileTest.readable_real?(self.to_s) と同じです。


@see FileTest.#readable_real?

絞り込み条件を変える

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

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

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


@see IO.readlines

Pathname#rename(to) -> 0 (63049.0)

File.rename(self.to_s, to) と同じです。

File.rename(self.to_s, to) と同じです。

@param to ファイル名を表す文字列を指定します。


@see File.rename

Pathname#rmdir -> 0 (63049.0)

Dir.rmdir(self.to_s) と同じです。

Dir.rmdir(self.to_s) と同じです。


@see Dir.rmdir

Pathname#rmtree -> nil (63049.0)

FileUtils.rm_r(self.to_s) と同じです。

FileUtils.rm_r(self.to_s) と同じです。


@see FileUtils.#rm_r

Pathname#setgid? -> bool (63049.0)

FileTest.setgid?(self.to_s) と同じです。

FileTest.setgid?(self.to_s) と同じです。


@see FileTest.#setgid?

絞り込み条件を変える

Pathname#setuid? -> bool (63049.0)

FileTest.setuid?(self.to_s) と同じです。

FileTest.setuid?(self.to_s) と同じです。


@see FileTest.#setuid?

Pathname#size -> Integer (63049.0)

FileTest.size(self.to_s) と同じです。

FileTest.size(self.to_s) と同じです。


@see FileTest.#size

Pathname#size? -> bool (63049.0)

FileTest.size?(self.to_s) と同じです。

FileTest.size?(self.to_s) と同じです。


@see FileTest.#size?

Pathname#socket? -> bool (63049.0)

FileTest.socket?(self.to_s) と同じです。

FileTest.socket?(self.to_s) と同じです。


@see FileTest.#socket?

Pathname#stat -> File::Stat (63049.0)

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

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


@see File.stat

絞り込み条件を変える

Pathname#sticky? -> bool (63049.0)

FileTest.sticky?(self.to_s) と同じです。

FileTest.sticky?(self.to_s) と同じです。


@see FileTest.#sticky?

Pathname#symlink? -> bool (63049.0)

FileTest.symlink?(self.to_s) と同じです。

FileTest.symlink?(self.to_s) と同じです。


@see FileTest.#symlink?

Pathname#sysopen(*args) -> Integer (63049.0)

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

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


@see IO.sysopen

Pathname#truncate(length) -> 0 (63049.0)

File.truncate(self.to_s, length) と同じです。

File.truncate(self.to_s, length) と同じです。


@param length 変更したいサイズを整数で与えます。

@see File.truncate

Pathname#utime(atime, mtime) -> Integer (63049.0)

File.utime(atime, mtime, self.to_s) と同じです。

File.utime(atime, mtime, self.to_s) と同じです。

@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。

@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。


@see File.utime

絞り込み条件を変える

Pathname#world_readable? -> bool (63049.0)

FileTest.world_readable?(self.to_s) と同じです。

FileTest.world_readable?(self.to_s) と同じです。


@see FileTest.#world_readable?

Pathname#world_writable? -> bool (63049.0)

FileTest.world_writable?(self.to_s) と同じです。

FileTest.world_writable?(self.to_s) と同じです。


@see FileTest.#world_writable?

Pathname#writable? -> bool (63049.0)

FileTest.writable?(self.to_s) と同じです。

FileTest.writable?(self.to_s) と同じです。


@see FileTest.#writable?

Pathname#writable_real? -> bool (63049.0)

FileTest.writable_real?(self.to_s) と同じです。

FileTest.writable_real?(self.to_s) と同じです。


@see FileTest.#writable_real?

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

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

@see IO.write

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (235.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

1.6.8から1.8.0への変更点(まとめ)
* ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>))
* ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>))
* ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>))...

NEWS for Ruby 2.7.0 (235.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 2.7.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...

NEWS for Ruby 2.0.0 (127.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
* デフォルトのソースエンコーディングを US-ASCI...

NEWS for Ruby 2.5.0 (73.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ms.org/2017/11/08/2.7.2-released.html
* https://blog.rubygems.org/2017/11/03/2.7.1-released.html
* https://blog.rubygems.org/2017/11/01/2.7.0-released.html
* https://blog.rubygems.org/2017/10/09/2.6.14-released.html
* https://blog.rubygems.org/2017/08/27/2.6.13-released.html...