606件ヒット
[101-200件を表示]
(0.312秒)
ライブラリ
- ビルトイン (606)
クラス
-
ARGF
. class (22) - Array (22)
- Bignum (6)
- Complex (11)
- Data (4)
- Dir (11)
- Encoding (11)
-
Encoding
:: Converter (11) -
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Chain (6) - Exception (11)
- FalseClass (22)
- Fixnum (6)
- Float (22)
- Hash (33)
- Integer (22)
- MatchData (11)
- Method (22)
- Module (46)
- Object (22)
- Proc (22)
-
Process
:: Status (11) - Range (22)
- Rational (22)
- Regexp (22)
-
RubyVM
:: AbstractSyntaxTree :: Node (6) -
RubyVM
:: InstructionSequence (11) - String (22)
- Struct (22)
- Symbol (11)
- Thread (38)
-
Thread
:: Backtrace :: Location (11) - Time (5)
- TracePoint (11)
- TrueClass (11)
- UnboundMethod (32)
キーワード
- % (11)
- [] (11)
-
bind
_ call (10) -
const
_ added (2) -
const
_ missing (11) -
default
_ proc (11) -
initialize
_ copy (11) - name (11)
- name= (9)
-
to
_ s (169)
検索結果
先頭5件
-
Thread
# inspect -> String (26114.0) -
自身を人間が読める形式に変換した文字列を返します。
...自身を人間が読める形式に変換した文字列を返します。
//emlist[例][ruby]{
a = Thread.current
a.inspect # => "#<Thread:0x00007fdbaf07ddb0 run>"
b = Thread.new{}
b.inspect # => "#<Thread:0x00007fdbaf8f7d10@(irb):3 dead>"
//}... -
Time
# inspect -> String (26114.0) -
時刻を文字列に変換した結果を返します。
...で含めて返します。
//emlist[][ruby]{
t = Time.now
t.inspect #=> "2012-11-10 18:16:12.261257655 +0100"
t.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.261257655 +0100"
t.utc.inspect #=> "2012-11-10 17:16:12.261257655 UTC"... -
Array
# inspect -> String (26108.0) -
自身の情報を人間に読みやすい文字列にして返します。
...自身の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
[1, 2, 3, 4].to_s # => "[1, 2, 3, 4]"
[1, 2, 3, 4].inspect # => "[1, 2, 3, 4]"
//}... -
Data
# inspect -> String (26108.0) -
self の内容を人間に読みやすい文字列にして返します。
...ます。
//emlist[例][ruby]{
Customer = Data.define(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.inspect # => "#<data Customer name=\"Joe Smith\", address=\"123 Maple, Anytown NC\", zip=12345>"
//}
[注意] 本メソッドの記述は Data のサブ... -
Dir
# inspect -> String (26108.0) -
self の情報を人間に読みやすい文字列にして返します。
...self の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
Dir.open("/") { |d| d.inspect } # => "#<Dir:/>"
//}... -
Exception
# inspect -> String (26108.0) -
self のクラス名と message を文字列にして返します。
...self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
Hash
# inspect -> String (26108.0) -
ハッシュの内容を人間に読みやすい文字列にして返します。
...ハッシュの内容を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
h = { "c" => 300, "a" => 100, "d" => 400 }
h.inspect # => "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
//}... -
Regexp
# inspect -> String (26108.0) -
Regexp#to_s より自然な文字列を返します。
...Regexp#to_s より自然な文字列を返します。
//emlist[例][ruby]{
p /^ugou.*?/i.to_s # => "(?i-mx:^ugou.*?)"
p /^ugou.*?/i.inspect # => "/^ugou.*?/i"
//}
@see Regexp#to_s... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (26108.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 (26108.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 (26108.0) -
self の内容を人間に読みやすい文字列にして返します。
...クラスを作成する点に
注意してください。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.inspect # => "#<struct Customer name=\"Joe Smith\", address=\"123 Maple, Anytown NC\", zip=12345>"
//}...