435件ヒット
[1-100件を表示]
(0.041秒)
別のキーワード
種類
- インスタンスメソッド (313)
- 文書 (89)
- ライブラリ (22)
- クラス (11)
クラス
- Bignum (6)
- Data (4)
- Dir (11)
-
Enumerator
:: Chain (6) - Exception (11)
- Fixnum (6)
-
IRB
:: OutputMethod (22) - MatchData (11)
- Method (22)
- Module (2)
- Object (33)
- Proc (22)
- Range (22)
-
RubyVM
:: AbstractSyntaxTree :: Node (6) -
RubyVM
:: InstructionSequence (11) -
Socket
:: Ifaddr (11) - String (11)
- Struct (22)
- Thread (9)
- TracePoint (11)
- UnboundMethod (32)
-
WIN32OLE
_ TYPE (11) -
Zlib
:: GzipFile :: Error (11)
キーワード
- % (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) - Numeric (11)
-
bind
_ call (10) -
const
_ added (2) -
drb
/ gw (11) -
initialize
_ copy (11) - irb (11)
- name= (9)
- pp (11)
- ppx (11)
-
pretty
_ inspect (11) -
pretty
_ print (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
to
_ s (63) - クラス/メソッドの定義 (11)
検索結果
先頭5件
-
Range
# inspect -> String (18145.0) -
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド で文字列に変換されます)。
...
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド
で文字列に変換されます)。
@see Range#to_s
//emlist[例][ruby]{
(1..5).inspect # => "1..5"
("1".."5").inspect # => "\"1\"..\"5\""
//}... -
MatchData
# inspect -> String (18141.0) -
self の内容を人間に読みやすい文字列にして返します。
...
self の内容を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
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" foo:"h" bar:"o" baz:"g">
//}... -
Method
# inspect -> String (18135.0) -
self を読みやすい文字列として返します。
...
self を読みやすい文字列として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクト......# スーパークラスのクラスメソッド
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......
self を読みやすい文字列として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクト......ラスメソッド
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 (18135.0) -
self を読みやすい文字列として返します。
...
self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
Data
# inspect -> String (18123.0) -
self の内容を人間に読みやすい文字列にして返します。
...
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... -
Dir
# inspect -> String (18123.0) -
self の情報を人間に読みやすい文字列にして返します。
...
self の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
Dir.open("/") { |d| d.inspect } # => "#<Dir:/>"
//}... -
Exception
# inspect -> String (18123.0) -
self のクラス名と message を文字列にして返します。
...
self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//}... -
Proc
# inspect -> String (18123.0) -
self の文字列表現を返します。
...
self の文字列表現を返します。
可能なら self を生成したソースファイル名、行番号を含みます。
//emlist[例][ruby]{
p Proc.new {
true
}.to_s
# => "#<Proc:0x0x401a880c@-:3>"
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (18123.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 (18123.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#labe... -
Struct
# inspect -> String (18123.0) -
self の内容を人間に読みやすい文字列にして返します。
...
self の内容を人間に読みやすい文字列にして返します。
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してくださ......い。
//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>"
//}...