168件ヒット
[1-100件を表示]
(0.052秒)
別のキーワード
種類
- インスタンスメソッド (108)
- モジュール関数 (24)
- 特異メソッド (24)
- 定数 (12)
ライブラリ
- ビルトイン (96)
- fileutils (12)
-
rdoc
/ top _ level (12) - uri (48)
クラス
- File (24)
-
RDoc
:: TopLevel (12) -
RubyVM
:: InstructionSequence (24) -
Thread
:: Backtrace :: Location (24) -
URI
:: Generic (48)
キーワード
- - (12)
-
CLOCK
_ MONOTONIC (12) - absolute? (12)
-
absolute
_ path (36) - chmod (12)
-
clock
_ gettime (12) -
file
_ absolute _ name (12) - path (36)
-
route
_ from (12)
検索結果
先頭5件
-
URI
:: Generic # absolute -> bool (21114.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 (9114.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false... -
File
. absolute _ path(file _ name , dir _ string=nil) -> String (6225.0) -
file_name を絶対パスに変換した文字列を返します。
...す。
dir_string を渡した場合はそのディレクトリを基準とします。
File.expand_path と異なり、 file_name 先頭が "~" である場合
それは展開されません。普通のディレクトリ名として処理されます。
//emlist[例][ruby]{
p Dir.getwd......rk/bar"
p ENV["HOME"] #=> "/home/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.absolute_path("~foo") #=> "/home/matz/work/bar/~foo"
//}
@see Fil... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (6213.0) -
self が表す命令シーケンスの絶対パスを返します。
...led>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method... -
Process
. # clock _ gettime(clock _ id , unit=:float _ second) -> Float | Integer (6212.0) -
POSIX の clock_gettime() 関数の時間を返します。
...POSIX の clock_gettime() 関数の時間を返します。
例:
p Process.clock_gettime(Process::CLOCK_MONOTONIC) #=> 896053.968060096
@param clock_id クロックの種類を以下の定数のいずれかで指定します。
サポートされている定数は OS やバー......: Process::CLOCK_UPTIME_PRECISE
FreeBSD 8.1
: Process::CLOCK_SECOND
FreeBSD 8.1
SUS は Single Unix Specification を意味しており、
SUS は POSIX と POSIX の一部で定義されている clock_gettime を含みます。
SUS では CLOCK_REALTIME は必須ですが、CLOCK_MONOTONIC, CLO...... gettimeofday() を使います。 (しかし SUSv4 で obsoleted になっています)
精度は1マイクロ秒です。
: :TIME_BASED_CLOCK_REALTIME
ISO C で定義されている time() を使います。
精度は1秒です。
CLOCK_MONOTONIC のエミュレーション:
: :MACH_ABSOLUTE_... -
Thread
:: Backtrace :: Location # absolute _ path -> String (6207.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... -
RDoc
:: TopLevel # file _ absolute _ name -> String (6201.0) -
自身が管理するファイルに関する絶対パスを文字列で返します。
自身が管理するファイルに関する絶対パスを文字列で返します。 -
URI
:: Generic # -(src) -> URI :: Generic (3106.0) -
与えられた URI を表す src からの相対パスを返します。
...rc からの相対パスを返します。
@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 (3106.0) -
与えられた URI を表す src からの相対パスを返します。
...rc からの相対パスを返します。
@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>...