るりまサーチ

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

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 > >>

URI::Generic#path -> String | nil (18255.0)

自身の path を文字列で返します。設定されていない場合は nil を返します。

...自身の path を文字列で返します。設定されていない場合は nil を返します。

require
'uri'
p URI.parse('http://example.com/hoge').path #=> "/hoge"
p URI.parse('http://example.com').path #=> ""
p URI.parse('mailto:nospam@localhost').path #=> n...
...il
p URI('ftp://example.com/foo').path #=> 'foo'
p URI('ftp://example.com/%2Ffoo').path #=> '/foo'...

LoadError#path -> String | nil (18231.0)

Kernel.#require や Kernel.#load に失敗したパスを返します。

...Kernel.#require や Kernel.#load に失敗したパスを返します。

begin
require
'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end

パスが定まらない場合は nil を返します。...

Net::HTTPGenericRequest#path -> String (18231.0)

リクエストする path を文字列で返します。

...リクエストする path を文字列で返します。

//emlist[例][ruby]{
require
'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.path # => "/index.html"
//}...

Tempfile#path -> String | nil (18221.0)

テンポラリファイルのパス名を返します。

...テンポラリファイルのパス名を返します。

Tempfile#close! を実行後だった場合にはnilを返します。

require
"tempfile"
tf = Tempfile.new("hoo")
p tf.path # => "/tmp/hoo.10596.0"
tf.close!
p tf.path # => nil...

UNIXSocket#path -> String (18215.0)

UNIX ソケットのパスを返します。

...UNIX ソケットのパスを返します。

クライアント側はパスを持たないため空文字列となります。

例:

require
'socket'

UNIXServer.open("/tmp/s") {|serv|
p serv.path #=> "/tmp/s"
}...

絞り込み条件を変える

Gem::Specification#require_path -> String (12326.0)

Gem::Specification#require_paths の単数バージョンです。

...Gem::Specification#require_paths の単数バージョンです。

@see Gem::Specification#require_paths...

Gem::Specification#require_paths -> [String] (12319.0)

この Gem パッケージを使用した際に require するファイルが置かれているディレクトリ のリストを返します。

...この Gem パッケージを使用した際に require するファイルが置かれているディレクトリ
のリストを返します。...

Addrinfo#unix_path -> String (6231.0)

Unix domain socket の path を文字列で返します。

...Unix domain socket の path を文字列で返します。

require
'socket'

Addrinfo.unix("/tmp/sock").unix_path #=> "/tmp/sock"

@raise SocketError アドレスが Unix domain socket のものでない場合に発生します...

Rake::PackageTask#package_dir_path -> String (6215.0)

パッケージに含むファイルを配置するディレクトリを返します。

...パッケージに含むファイルを配置するディレクトリを返します。

//emlist[][ruby]{
# Rakefile での記載例とする
require
'rake/packagetask'

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir_path # => "pkg/sample-1.0.0"
end
//}...
<< 1 2 3 > >>