るりまサーチ

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

別のキーワード

  1. base digest
  2. base ==
  3. base file
  4. base hexdigest
  5. bigdecimal base

ライブラリ

クラス

キーワード

検索結果

Pathname#relative_path_from(base_directory) -> Pathname (6200.0)

base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。

...base_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。

パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。

self が相対パスなら base_directory...
...self が絶対パスなら
base_dir
ectory も絶対パスでなければなりません。

@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。

@raise ArgumentError Windows上でドライブが違うなど、base_directory から self への...
...相対パスが求められないときに例外が発生します。

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

path = Pathname.new("/tmp/foo")
base = Pathname.new("/tmp")

path.relative_path_from(base) # => #<Pathname:foo>
//}...

rdoc/generator/json_index (6006.0)

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

...This generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.

このジェネレータは HTML ジェネレータと一緒に使うために設計されています。:

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
end
end

=== インデックスフォーマット

検索用のインデックスは JSON ファイルに出力されます。search_dat...
..._data = {
"index": {
"searchIndex":
["a", "b", ...],
"longSearchIndex":
["a", "a::b", ...],
"info": [
["A", "A", "A.html", "", ""],
["B", "A::B", "A::B.html", "", ""],
...
]
}
}

searchIndex、longSearchIndex、info 中の情...