るりまサーチ

最速Rubyリファレンスマニュアル検索!
782件ヒット [201-300件を表示] (0.237秒)

別のキーワード

  1. _builtin new
  2. _builtin []
  3. _builtin to_s
  4. _builtin each

ライブラリ

モジュール

オブジェクト

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Struct#inspect -> String (26107.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>"
//}...

Symbol#inspect -> String (26107.0)

自身を人間に読みやすい文字列にして返します。

...自身を人間に読みやすい文字列にして返します。

:fred.inspect #=> ":fred"...

Thread::Backtrace::Location#inspect -> String (26107.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...][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 `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...

TracePoint#inspect -> String (26107.0)

self の状態を人間に読みやすい文字列にして返します。

...self の状態を人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.inspect # "#<TracePoint:call `foo'@/path/to/test.rb:1>"
end
trace.enable
foo 1
//}...

TrueClass#inspect -> String (26107.0)

常に文字列 "true" を返します。

...常に文字列 "true" を返します。

//emlist[例][ruby]{
true.inspect # => "true"
//}...

絞り込み条件を変える

ARGF.class#inspect -> String (26101.0)

常に文字列 "ARGF" を返します。

常に文字列 "ARGF" を返します。

Bignum#inspect(base = 10) -> String (26101.0)

self を引数で指定した基数の文字列表現に変換します。

self を引数で指定した基数の文字列表現に変換します。

@param base 基数を 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) ...

Encoding::Converter#inspect -> String (26101.0)

Encoding::Converter オブジェクトの情報を簡単に表示します。

Encoding::Converter オブジェクトの情報を簡単に表示します。

@return 変換器の情報を簡単に可視化した文字列です。

Enumerator::ArithmeticSequence#inspect -> String (26101.0)

自身を人間が読みやすい形の文字列表現にして返します。

自身を人間が読みやすい形の文字列表現にして返します。

Enumerator::Chain#inspect -> String (26101.0)

self を人間が読みやすい形式で文字列として返します。

self を人間が読みやすい形式で文字列として返します。

絞り込み条件を変える

FalseClass#inspect -> String (26101.0)

常に文字列 "false" を返します。

常に文字列 "false" を返します。

//emlist[例][ruby]{
false.to_s # => "false"
//}
<< < 1 2 3 4 5 ... > >>