るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.083秒)
トップページ > クエリ:dir=[x] > クエリ:expand_path[x]

別のキーワード

  1. rss title=
  2. rss date=
  3. rss link=
  4. rss description=
  5. rss about=

ライブラリ

クラス

検索結果

Pathname#expand_path(default_dir = '.') -> Pathname (18136.0)

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

...w(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.expand_path("../") # => #<Pathname:/path/testfile>
//}

@see File.expand_path...

File.expand_path(path, default_dir = &#39;.&#39;) -> String (18126.0)

path を絶対パスに展開した文字列を返します。 path が相対パスであれば default_dir を基準にします。

...matz/work/foo"
p ENV["HOME"] #=> "/home/matz"
p File.expand_path("..") #=> "/home/matz/work"
p File.expand_path("..", "/tmp") #=> "/"
p File.expand_path("~") #=> "/home/matz"
p File.expand_path("~foo") #=> "/home/foo"
//}

@param path パスを表す文字...

rdoc/generator/json_index (12.0)

他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。

...に使うために設計されています。:

class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.expand_path

@json_index = RDoc::Generator::JsonIndex.new self, options
end

def generate
# ...
@json_index.generate
e...