133件ヒット
[1-100件を表示]
(0.159秒)
ライブラリ
- ビルトイン (72)
-
irb
/ context (36) -
minitest
/ unit (1) - optparse (12)
-
rdoc
/ context (12)
クラス
-
Encoding
:: Converter (12) - Exception (12)
-
IRB
:: Context (36) -
OptionParser
:: ParseError (12) -
RDoc
:: Context :: Section (12) - Rational (24)
-
RubyVM
:: InstructionSequence (12) -
Thread
:: Backtrace :: Location (12)
モジュール
キーワード
-
_ _ inspect _ _ (12) -
mu
_ pp (1) -
to
_ s (24)
検索結果
先頭5件
-
RDoc
:: Context :: Section # inspect -> String (30303.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。 -
Rational
# inspect -> String (27327.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...に10進数の表記を返します。
@return 有理数の表記にした文字列を返します。
//emlist[例][ruby]{
Rational(5, 8).inspect # => "(5/8)"
Rational(2).inspect # => "(2/1)"
Rational(-8, 6).inspect # => "(-4/3)"
Rational(0.5).inspect # => "(1/2)"
//}
@see Rational#to_s... -
Exception
# inspect -> String (27309.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
OptionParser
:: ParseError # inspect -> String (27309.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...自身を人間が読みやすい形の文字列表現にして返します。
@return 文字列を返します。
@see Object#inspect... -
RubyVM
:: InstructionSequence # inspect -> String (27309.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
Thread
:: Backtrace :: Location # inspect -> String (27309.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
...
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).loc......ations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}... -
IRB
:: Context # inspect -> String (27304.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。 -
Encoding
:: Converter # inspect -> String (27303.0) -
Encoding::Converter オブジェクトの情報を簡単に表示します。
...Encoding::Converter オブジェクトの情報を簡単に表示します。
@return 変換器の情報を簡単に可視化した文字列です。... -
IRB
:: Context # _ _ inspect _ _ -> String (15303.0) -
自身を文字列表現にしたオブジェクトを返します。
自身を文字列表現にしたオブジェクトを返します。