ライブラリ
- ビルトイン (7)
-
irb
/ context (6) -
irb
/ ext / math-mode (2) -
minitest
/ unit (1) - optparse (1)
-
rdoc
/ context (1) - win32ole (1)
クラス
-
Encoding
:: Converter (1) - Exception (1)
-
IRB
:: Context (8) - Module (1)
-
OptionParser
:: ParseError (1) -
RDoc
:: Context :: Section (1) - Rational (2)
-
RubyVM
:: InstructionSequence (1) -
Thread
:: Backtrace :: Location (1) -
WIN32OLE
_ EVENT (1)
モジュール
キーワード
-
_ _ inspect _ _ (1) -
const
_ missing (1) - handler= (1)
- inspect? (1)
-
inspect
_ mode (1) -
inspect
_ mode= (1) - math? (1)
-
math
_ mode (1) -
mu
_ pp (1) -
to
_ s (2)
検索結果
先頭5件
-
RDoc
:: Context :: Section # inspect -> String (72307.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。 -
Rational
# inspect -> String (63379.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
"(3/5)", "(-17/7)" のように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 (63325.0) -
self のクラス名と message を文字列にして返します。
self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//} -
OptionParser
:: ParseError # inspect -> String (63325.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
@return 文字列を返します。
@see Object#inspect -
RubyVM
:: InstructionSequence # inspect -> String (63325.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
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 (63325.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).locations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in ... -
Encoding
:: Converter # inspect -> String (63307.0) -
Encoding::Converter オブジェクトの情報を簡単に表示します。
Encoding::Converter オブジェクトの情報を簡単に表示します。
@return 変換器の情報を簡単に可視化した文字列です。 -
IRB
:: Context # inspect -> String (63307.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。 -
IRB
:: Context # inspect _ mode=(opt) (27397.0) -
実行結果の出力方式を opt に設定します。
実行結果の出力方式を opt に設定します。
@param opt 以下のいずれかを指定します。
: false, :to_s, :raw
出力結果を to_s したものを表示します。
: true, :p, :inspect
出力結果を inspect したものを表示します。
: :pp, :pretty_inspect
出力結果を pretty_inspect したものを表示します。
: :yaml, :YAML
出力結果を YAML 形式にしたものを表示します。
: :marshal, :Marshal, :MARSHAL, Marshal
出力結果を Marsh... -
IRB
:: Context # inspect? -> bool (27391.0) -
IRB::Context#inspect_mode が有効かどうかを返します。
IRB::Context#inspect_mode が有効かどうかを返します。
@return 出力結果に to_s したものを表示する場合は false を返します。それ
以外の場合は true を返します。
@see IRB::Context#inspect_mode, IRB::Context#inspect_mode= -
IRB
:: Context # inspect _ mode -> object | nil (27325.0) -
実行結果の出力方式を返します。
実行結果の出力方式を返します。
@see IRB::Context#inspect_mode= -
IRB
:: Context # _ _ inspect _ _ -> String (27307.0) -
自身を文字列表現にしたオブジェクトを返します。
自身を文字列表現にしたオブジェクトを返します。 -
Module
# const _ missing(name) (18322.0) -
定義されていない定数を参照したときに Ruby インタプリタが このメソッドを呼びます。
定義されていない定数を参照したときに Ruby インタプリタが
このメソッドを呼びます。
@param name 参照した定数名の Symbol
@raise NameError このメソッドを呼び出した場合、デフォルトで発生する例外
//emlist[例][ruby]{
class Foo
def Foo.const_missing(id)
warn "undefined constant #{id.inspect}"
end
Bar
end
Foo::Bar
# => undefined constant :Bar
# undefined consta... -
IRB
:: Context # to _ s -> String (18007.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。 -
MiniTest
:: Assertions # mu _ pp(object) -> String (9052.0) -
Object#inspect した結果のエンコーディングを変更して返します。
Object#inspect した結果のエンコーディングを変更して返します。
エンコーディングは Encoding.default_external に変更されます。
@param object 任意のオブジェクトを指定します。 -
IRB
:: Context # math? -> bool (9022.0) -
math_mode が有効かどうかを返します。
math_mode が有効かどうかを返します。
@see IRB::Context#math_mode=, IRB::Context#inspect? -
IRB
:: Context # math _ mode -> bool (9022.0) -
math_mode が有効かどうかを返します。
math_mode が有効かどうかを返します。
@see IRB::Context#math_mode=, IRB::Context#inspect? -
Rational
# to _ s -> String (9022.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
"3/5", "-17/7" のように10進数の表記を返します。
@return 有理数の表記にした文字列を返します。
//emlist[例][ruby]{
Rational(3, 4).to_s # => "3/4"
Rational(8).to_s # => "8/1"
Rational(-8, 6).to_s # => "-4/3"
Rational(0.5).to_s # => "1/2"
//}
@see Rational#inspect -
WIN32OLE
_ EVENT # handler=(obj) -> () (76.0) -
イベント処理を実行するオブジェクトを登録します。
イベント処理を実行するオブジェクトを登録します。
イベントハンドラをメソッドとして持つオブジェクトをイベントハンドラとし
て登録します。
イベントハンドラはイベント名に「on」を前置します。もし、イベントに対応
するonメソッドが実装されていなければmethod_missingが呼ばれます。イベン
ト名は大文字小文字を区別するため、正確な記述が必要です。
@param obj イベントに対応するメソッドを持つオブジェクト。イベント受信を
解除するにはnilを指定します。
class IeHandler
def initialize
@com...