873件ヒット
[1-100件を表示]
(0.222秒)
種類
- インスタンスメソッド (666)
- モジュール関数 (132)
- 特異メソッド (51)
- クラス (24)
ライブラリ
- ビルトイン (873)
クラス
-
ARGF
. class (24) - Array (24)
- Bignum (6)
- Complex (12)
- Data (6)
- Dir (12)
- Encoding (12)
-
Encoding
:: Converter (12) -
Enumerator
:: ArithmeticSequence (7) -
Enumerator
:: Chain (7) - Exception (12)
- FalseClass (24)
- Fixnum (6)
- Float (24)
- Hash (36)
- Integer (24)
- MatchData (12)
- Method (24)
- Module (51)
- Object (24)
- Proc (24)
-
Process
:: Status (12) - Range (24)
- Rational (24)
- Regexp (24)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (12) - String (24)
- Struct (24)
- Symbol (12)
- Thread (42)
-
Thread
:: Backtrace :: Location (12) - Time (21)
- TracePoint (12)
- TrueClass (12)
- UnboundMethod (36)
モジュール
- Kernel (132)
キーワード
- % (12)
- Numeric (12)
- Thread (12)
- [] (12)
- ` (12)
- abort (24)
-
bind
_ call (12) -
const
_ added (3) -
const
_ missing (12) -
default
_ proc (12) - exit (12)
- format (12)
-
initialize
_ copy (12) - name (12)
- name= (10)
- new (12)
- now (3)
- p (12)
- sprintf (12)
-
to
_ s (197) -
trace
_ var (36) -
untrace
_ var (12)
検索結果
先頭5件
-
Complex
# inspect -> String (26131.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...uby]{
Complex(2).inspect # => "(2+0i)"
Complex('-8/6').inspect # => "((-4/3)+0i)"
Complex('1/2i').inspect # => "(0+(1/2)*i)"
Complex(0, Float::INFINITY).inspect # => "(0+Infinity*i)"
Complex(Float::NAN, Float::NAN).inspect # => "(NaN+NaN*... -
Object
# inspect -> String (26131.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...して
オブジェクトを表示します。
//emlist[][ruby]{
[ 1, 2, 3..4, 'five' ].inspect # => "[1, 2, 3..4, \"five\"]"
Time.new.inspect # => "2008-03-08 19:43:39 +0900"
//}
inspect メソッドをオーバーライドしなかった場合、クラス名とインスタン......変数の名前、値の組を元にした文字列を返します。
//emlist[][ruby]{
class Foo
end
Foo.new.inspect # => "#<Foo:0x0300c868>"
class Bar
def initialize
@bar = 1
end
end
Bar.new.inspect # => "#<Bar:0x0300c868 @bar=1>"
//}
@see Kernel.#p... -
Range
# inspect -> String (26129.0) -
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド で文字列に変換されます)。
...self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド
で文字列に変換されます)。
@see Range#to_s
//emlist[例][ruby]{
(1..5).inspect # => "1..5"
("1".."5").inspect # => "\"1\"..\"5\""
//}... -
MatchData
# inspect -> String (26125.0) -
self の内容を人間に読みやすい文字列にして返します。
...]{
puts /.$/.match("foo").inspect
# => #<MatchData "o">
puts /(.)(.)(.)/.match("foo").inspect
# => #<MatchData "foo" 1:"f" 2:"o" 3:"o">
puts /(.)(.)?(.)/.match("fo").inspect
# => #<MatchData "fo" 1:"f" 2:nil 3:"o">
puts /(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").inspect
# => #<MatchData "hog" fo... -
Rational
# inspect -> String (26125.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... -
Method
# inspect -> String (26119.0) -
self を読みやすい文字列として返します。
...式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......# スーパークラスのクラスメソッド
class Bar < Foo
end
p Bar.method(:foo) # => #<Method: Bar.foo>
# 以下は(形式1)の出力になる
module Baz
def baz
end
end
class <<obj
include Baz
end
p obj.method(:baz) # => #<Method: Object(Baz)#baz>
//}
@see Object#inspect......の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......ラスメソッド
class Bar < Foo
end
p Bar.method(:foo) # => #<Method: Bar(Foo).foo() foo.rb:11>
# 以下は(形式1)の出力になる
module Baz
def baz
end
end
class <<obj
include Baz
end
p obj.method(:baz) # => #<Method: String(Baz)#baz() foo.rb:23>
//}
@see Object#inspect... -
UnboundMethod
# inspect -> String (26119.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
ENV
. inspect -> String (26117.0) -
ENV オブジェクトを文字列化します。 Hash#inspect と同じように動作します。
...ENV オブジェクトを文字列化します。 Hash#inspect と同じように動作します。... -
Encoding
# inspect -> String (26113.0) -
プログラマにわかりやすい表現の文字列を返します。
...プログラマにわかりやすい表現の文字列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.inspect #=> "#<Encoding:UTF-8>"
Encoding::ISO_2022_JP.inspect #=> "#<Encoding:ISO-2022-JP (dummy)>"
//}...