るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

キーワード

検索結果

Shell#pwd -> String (45325.0)

カレントディレクトリのパスを文字列で返します。

カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"

Pathname#expand_path(default_dir = '.') -> Pathname (70.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...

Shell#cwd -> String (25.0)

カレントディレクトリのパスを文字列で返します。

カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"

Shell#dir -> String (25.0)

カレントディレクトリのパスを文字列で返します。

カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"

Shell#getwd -> String (25.0)

カレントディレクトリのパスを文字列で返します。

カレントディレクトリのパスを文字列で返します。

使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"

絞り込み条件を変える