338件ヒット
[1-100件を表示]
(0.130秒)
ライブラリ
- ビルトイン (172)
-
minitest
/ unit (1) - pathname (11)
-
rdoc
/ top _ level (22) - resolv (11)
- uri (22)
-
webrick
/ httpserver (22) -
webrick
/ httpservlet / abstract (77)
クラス
- Bignum (6)
- Complex (33)
- Fixnum (6)
- Float (11)
- Integer (11)
- Numeric (33)
- Pathname (11)
-
RDoc
:: TopLevel (22) - Rational (8)
-
Resolv
:: DNS :: Name (11) -
RubyVM
:: AbstractSyntaxTree :: Node (42) -
RubyVM
:: InstructionSequence (11) -
Thread
:: Backtrace :: Location (11) -
URI
:: Generic (22) -
WEBrick
:: HTTPServer :: MountTable (22) -
WEBrick
:: HTTPServlet :: AbstractServlet (77)
モジュール
キーワード
- [] (11)
- abs2 (22)
- absolute (11)
- absolute? (33)
-
absolute
_ path (22) -
assert
_ in _ epsilon (1) - children (6)
- delete (11)
-
do
_ DELETE (11) -
do
_ GET (11) -
do
_ HEAD (11) -
do
_ OPTIONS (11) -
do
_ POST (11) -
do
_ PUT (11) -
file
_ absolute _ name (11) -
file
_ absolute _ name= (11) -
first
_ column (6) -
first
_ lineno (6) - inspect (6)
-
last
_ column (6) -
last
_ lineno (6) - magnitude (58)
- service (11)
- type (6)
検索結果
先頭5件
-
Bignum
# abs -> Fixnum | Bignum (21302.0) -
self の絶対値を返します。
self の絶対値を返します。 -
Fixnum
# abs -> Fixnum | Bignum (21302.0) -
self の絶対値を返します。
self の絶対値を返します。 -
Numeric
# abs -> Numeric (21220.0) -
自身の絶対値を返します。
...自身の絶対値を返します。
//emlist[例][ruby]{
12.abs #=> 12
(-34.56).abs #=> 34.56
-34.56.abs #=> 34.56
//}... -
Complex
# abs -> Numeric (18226.0) -
自身の絶対値を返します。
...す。
以下の計算の結果を Float オブジェクトで返します。
sqrt(self.real ** 2 + self.imag ** 2)
//emlist[例][ruby]{
Complex(1, 2).abs # => 2.23606797749979
Complex(3, 4).abs # => 5.0
Complex('1/2', '1/2').abs # => 0.7071067811865476
//}
@see Complex#abs2... -
Pathname
# absolute? -> bool (12201.0) -
self が絶対パス指定であれば真を返します。
...self が絶対パス指定であれば真を返します。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("/path/to/example.rb")
pathname.absolute? # => true
pathname = Pathname("../")
pathname.absolute? # => false
//}... -
RDoc
:: TopLevel # file _ absolute _ name -> String (12201.0) -
自身が管理するファイルに関する絶対パスを文字列で返します。
自身が管理するファイルに関する絶対パスを文字列で返します。 -
RDoc
:: TopLevel # file _ absolute _ name=(val) (12201.0) -
自身が管理するファイルに関する絶対パスを文字列で設定します。
自身が管理するファイルに関する絶対パスを文字列で設定します。
@param val パスを文字列で指定します。 -
Resolv
:: DNS :: Name # absolute? -> bool (12201.0) -
絶対パス形式であるかどうかを返します。
絶対パス形式であるかどうかを返します。 -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (12201.0) -
self が表す命令シーケンスの絶対パスを返します。
...= RubyVM::InstructionSequence.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 = Ruby......VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
Thread
:: Backtrace :: Location # absolute _ path -> String (12201.0) -
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... -
URI
:: Generic # absolute -> bool (12201.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false...