るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

RubyVM::InstructionSequence#path -> String (21219.0)

self が表す命令シーケンスの相対パスを返します。

...tionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSe...
...quence.compile_file('method.rb')
> iseq.path # => "method.rb"

@see RubyVM::InstructionSequence#absolute_path...

Thread::Backtrace::Location#path -> String (21213.0)

self が表すフレームのファイル名を返します。

...self が表すフレームのファイル名を返します。

例: Thread::Backtrace::Location の例1を用いた例

//emlist[][ruby]{
loc = c(0..1).first
loc.path # => "caller_locations.rb"
//}

@see Thread::Backtrace::Location#absolute_path...

Gem::ConfigFile#path -> String (21201.0)

Gem を探索するパスを返します。

Gem を探索するパスを返します。

Encoding::Converter.search_convpath(source_encoding, destination_encoding, options) -> Array (15680.0)

引数で指定した文字エンコーディングの変換の経路を配列にして返します。

...nation_encoding 変換先の文字エンコーディングを
Encoding オブジェクトか文字列で指定し
ます。

@param options 変換の詳細を指定する定数やハッシュを指定します。
Encoding::Conver...
...:Converter.search_convpath("ISO-8859-1", "EUC-JP")
# => [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
# [#<Encoding:UTF-8>, #<Encoding:EUC-JP>]]

p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-JP", universal_newline: true)
# or
p Encoding::Converter.search_convpath("ISO-8859-1", "EUC-J...
...# => [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
# [#<Encoding:UTF-8>, #<Encoding:EUC-JP>],
# "universal_newline"]

p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", universal_newline: true)
# or
p Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", newline: :unive...

Encoding::Converter#convpath -> Array (15348.0)

変換器が行う変換の経路を配列にして返します。

...う変換の経路の配列

//emlist[][ruby]{
ec = Encoding::Converter.new("ISo-8859-1", "EUC-JP", crlf_newline: true)
p ec.convpath
#=> [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
# [#<Encoding:UTF-8>, #<Encoding:EUC-JP>],
# "crlf_newline"]
//}

@see Encoding::Converter.search_convpath...

絞り込み条件を変える

Gem::Specification#installation_path -> String (15301.0)

この Gem パッケージのインストール先のパスを返します。

この Gem パッケージのインストール先のパスを返します。

IO#pathconf(name) -> Integer | nil (12306.0)

fpathconf(3) で取得したファイルの設定変数の値を返します。

...fpathconf(3) で取得したファイルの設定変数の値を返します。

引数 name が制限に関する設定値であり、設定が制限がない状態の場合は nil
を返します。(fpathconf(3) が -1 を返し、errno が設定されていない
場合)

@param name Etc モジ...
...ュールの PC_ で始まる定数のいずれかを指定します。

//emlist[][ruby]{
require 'etc'
IO.pipe {|r, w|
p w.pathconf(Etc::PC_PIPE_BUF) # => 4096
}
//}...

Pathname#cleanpath(consider_symlink = false) -> Pathname (9436.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

...余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

cleanpath は、実際にファイルシステムを参照することなく、文字列操作
だけで処理を行います。

@param consider_symlink 真ならパス要素にシンボリック...
...問題ないように .. を残します。

//emlist[例][ruby]{
require "pathname"
path
= Pathname.new("//.././../")
path
# => #<Pathname://.././../>
path
.cleanpath # => #<Pathname:/>


require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") res...
...cue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path
= Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")

path
.cleanpath # => #<Pathname:bar/bar>
path
.cleanpath(true) # => #<Pathname:bar/foo/../bar>
//}...

Thread::Backtrace::Location#absolute_path -> String (9231.0)

self が表すフレームの絶対パスを返します。

...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end

# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}

@see Thread::Backtrace::Location#path...

RubyVM::InstructionSequence#absolute_path -> String | nil (9219.0)

self が表す命令シーケンスの絶対パスを返します。

...tionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSe...
...quence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@see RubyVM::InstructionSequence#path...

絞り込み条件を変える

<< 1 2 3 ... > >>