13件ヒット
[1-13件を表示]
(0.098秒)
ライブラリ
- ビルトイン (5)
- pathname (1)
-
rdoc
/ top _ level (2) - resolv (1)
- uri (4)
クラス
- Pathname (1)
-
RDoc
:: TopLevel (2) -
Resolv
:: DNS :: Name (1) -
RubyVM
:: InstructionSequence (3) -
Thread
:: Backtrace :: Location (2) -
URI
:: Generic (4)
キーワード
- - (1)
- absolute? (3)
-
absolute
_ path (2) -
file
_ absolute _ name (1) -
file
_ absolute _ name= (1) - path (2)
-
route
_ from (1) -
to
_ a (1)
検索結果
先頭5件
-
URI
:: Generic # absolute -> bool (54346.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false -
URI
:: Generic # absolute? -> bool (18346.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false -
Pathname
# absolute? -> bool (18343.0) -
self が絶対パス指定であれば真を返します。
self が絶対パス指定であれば真を返します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/example.rb")
pathname.absolute? # => true
pathname = Pathname("../")
pathname.absolute? # => false
//} -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (18343.0) -
self が表す命令シーケンスの絶対パスを返します。
self が表す命令シーケンスの絶対パスを返します。
self を文字列から作成していた場合は nil を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.... -
Thread
:: Backtrace :: Location # absolute _ path -> String (18325.0) -
self が表すフレームの絶対パスを返します。
self が表すフレームの絶対パスを返します。
//emlist[例][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... -
RDoc
:: TopLevel # file _ absolute _ name -> String (18307.0) -
自身が管理するファイルに関する絶対パスを文字列で返します。
自身が管理するファイルに関する絶対パスを文字列で返します。 -
RDoc
:: TopLevel # file _ absolute _ name=(val) (18307.0) -
自身が管理するファイルに関する絶対パスを文字列で設定します。
自身が管理するファイルに関する絶対パスを文字列で設定します。
@param val パスを文字列で指定します。 -
Resolv
:: DNS :: Name # absolute? -> bool (18307.0) -
絶対パス形式であるかどうかを返します。
絶対パス形式であるかどうかを返します。 -
RubyVM
:: InstructionSequence # path -> String (22.0) -
self が表す命令シーケンスの相対パスを返します。
self が表す命令シーケンスの相対パスを返します。
self の作成時に指定した文字列を返します。self を文字列から作成していた
場合は "<compiled>" を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compi... -
RubyVM
:: InstructionSequence # to _ a -> Array (22.0) -
self の情報を 14 要素の配列にして返します。
self の情報を 14 要素の配列にして返します。
命令シーケンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージョン。
: format_type
データフォーマットを示す数値。常に 1。
: misc
以下の要素から構成される Hash オブジェクト。
:arg_size: メソッド、ブ... -
Thread
:: Backtrace :: Location # path -> String (22.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 -
URI
:: Generic # -(src) -> URI :: Generic (22.0) -
与えられた URI を表す src からの相対パスを返します。
与えられた URI を表す src からの相対パスを返します。
@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。
例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x20100256 URL:foo/bar.html> -
URI
:: Generic # route _ from(src) -> URI :: Generic (22.0) -
与えられた URI を表す src からの相対パスを返します。
与えられた URI を表す src からの相対パスを返します。
@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。
例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x20100256 URL:foo/bar.html>