263件ヒット
[1-100件を表示]
(0.131秒)
ライブラリ
- ビルトイン (185)
-
irb
/ inspector (11) -
irb
/ output-method (22) -
minitest
/ unit (1) - ostruct (22)
- rake (22)
クラス
- Bignum (6)
-
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Chain (6) - Fixnum (6)
- Hash (11)
-
IRB
:: Inspector (11) -
IRB
:: OutputMethod (22) - Module (46)
- OpenStruct (22)
-
Process
:: Status (11) -
Rake
:: TaskArguments (22) -
RubyVM
:: AbstractSyntaxTree :: Node (6) -
RubyVM
:: InstructionSequence (11) - String (11)
- Struct (22)
- TrueClass (11)
- UnboundMethod (32)
モジュール
キーワード
- % (11)
-
bind
_ call (10) -
const
_ added (2) -
const
_ missing (11) -
default
_ proc (11) -
inspect
_ value (11) -
mu
_ pp (1) - name (11)
- pp (11)
- ppx (11)
-
to
_ s (61)
検索結果
先頭5件
-
UnboundMethod
# inspect -> String (24120.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
OpenStruct
# inspect -> String (21108.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect... -
Rake
:: TaskArguments # inspect -> String (21108.0) -
自身を人間に読みやすい文字列にして返します。
...自身を人間に読みやすい文字列にして返します。
@see Hash#inspect... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (21108.0) -
self のデバッグ用の情報を含んだ文字列を返します。
...self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}... -
RubyVM
:: InstructionSequence # inspect -> String (21108.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
Struct
# inspect -> String (21108.0) -
self の内容を人間に読みやすい文字列にして返します。
...ドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Sm......ith", "123 Maple, Anytown NC", 12345)
joe.inspect # => "#<struct Customer name=\"Joe Smith\", address=\"123 Maple, Anytown NC\", zip=12345>"
//}... -
TrueClass
# inspect -> String (21108.0) -
常に文字列 "true" を返します。
...常に文字列 "true" を返します。
//emlist[例][ruby]{
true.inspect # => "true"
//}... -
Bignum
# inspect(base = 10) -> String (21102.0) -
self を引数で指定した基数の文字列表現に変換します。
...を 2 から 36 の整数で指定します。
12345654321.to_s #=> "12345654321"
12345654321.to_s(2) #=> "1011011111110110111011110000110001"
12345654321.to_s(8) #=> "133766736061"
12345654321.to_s(16) #=> "2dfdbbc31"
78546939656932.to_s(36) #=> "rubyrules"... -
Enumerator
:: ArithmeticSequence # inspect -> String (21102.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。 -
Enumerator
:: Chain # inspect -> String (21102.0) -
self を人間が読みやすい形式で文字列として返します。
self を人間が読みやすい形式で文字列として返します。 -
Fixnum
# inspect(base = 10) -> String (21102.0) -
self を引数で指定した基数の文字列表現に変換します。
self を引数で指定した基数の文字列表現に変換します。
@param base 基数を 2 から 36 の整数で指定します。
12345.to_s #=> "12345"
12345.to_s(2) #=> "11000000111001"
12345.to_s(8) #=> "30071"
12345.to_s(10) #=> "12345"
12345.to_s(16) #=> "3039"
12345.to_s(36) #=> "9ix" -
Module
# inspect -> String (21102.0) -
モジュールやクラスの名前を文字列で返します。
...:Session」「Net::HTTP」が挙げられます。
@return 名前のないモジュール / クラスに対しては、name は nil を、それ以外はオブジェクト ID の文字列を返します。
//emlist[例][ruby]{
module A
module B
end
p B.name #=> "A::B"
class C
end
end......p A.name #=> "A"
p A::B.name #=> "A::B"
p A::C.name #=> "A::C"
# 名前のないモジュール / クラス
p Module.new.name #=> nil
p Class.new.name #=> nil
p Module.new.to_s #=> "#<Module:0x00007f90b09112c8>"
p Class.new.to_s #=> "#<Class:0x00007fa5c40b41b0>"
//}...