905件ヒット
[1-100件を表示]
(0.086秒)
ライブラリ
- ビルトイン (524)
-
irb
/ context (36) -
irb
/ ext / math-mode (8) -
irb
/ inspector (36) -
irb
/ output-method (24) -
minitest
/ unit (1) -
net
/ smtp (12) - optparse (12)
- ostruct (24)
- pp (24)
- rake (24)
- shell (6)
-
shell
/ filter (6) - socket (12)
- strscan (12)
- sync (6)
- thwait (18)
-
win32
/ registry (12) - win32ole (24)
クラス
- Addrinfo (12)
- Bignum (6)
-
Encoding
:: Converter (12) - Fixnum (6)
- Float (24)
- Hash (12)
-
IRB
:: Context (44) -
IRB
:: Inspector (24) -
IRB
:: OutputMethod (24) - Integer (24)
- Method (24)
- Module (48)
-
Net
:: SMTP (12) - Object (48)
- OpenStruct (24)
-
OptionParser
:: ParseError (12) -
Rake
:: TaskArguments (24) - Range (24)
- Rational (24)
- Regexp (24)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (12) - Shell (6)
-
Shell
:: Filter (6) - String (24)
- StringScanner (12)
- Thread (22)
-
Thread
:: Backtrace :: Location (12) - ThreadsWait (18)
- Time (15)
- UnboundMethod (36)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12) -
Win32
:: Registry (12)
モジュール
- IRB (12)
- Kernel (132)
-
MiniTest
:: Assertions (1) -
Sync
_ m (6)
キーワード
- % (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Inspector (12)
- Thread (12)
- [] (12)
- ` (12)
- abort (24)
-
all
_ waits (12) -
bind
_ call (12) -
const
_ missing (12) - debug= (6)
-
def
_ inspector (12) -
default
_ proc (12) -
drb
/ gw (12) - exit (12)
- format (12)
- handler= (12)
-
initialize
_ copy (12) - inspect? (12)
-
inspect
_ mode (12) -
inspect
_ mode= (12) -
keys
_ with _ inspector (12) - math? (4)
-
math
_ mode (4) -
mu
_ pp (1) - name (12)
- name= (10)
- new (30)
- now (3)
- p (12)
- pp (12)
- ppx (12)
-
pretty
_ print (12) -
pretty
_ print _ inspect (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) - sprintf (12)
-
sync
_ inspect (6) -
to
_ s (126) -
trace
_ var (36) -
untrace
_ var (12) - クラス/メソッドの定義 (12)
- スレッド (12)
- パターンマッチ (12)
検索結果
先頭5件
-
Object
# inspect -> String (18149.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... -
StringScanner
# inspect -> String (18149.0) -
StringScannerオブジェクトを表す文字列を返します。
...記実行例の @ がスキャンポインタを表します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.inspect # => "#<StringScanner 0/11 @ \"test ...\">"
s.scan(/\w+/) # => "test"
s.inspect......# => "#<StringScanner 4/11 \"test\" @ \" stri...\">"
s.scan(/\s+/) # => " "
s.inspect # => "#<StringScanner 5/11 \"test \" @ \"strin...\">"
s.scan(/\w+/) # => "string"
s.inspect # => "#<String... -
Rational
# inspect -> String (18137.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... -
Range
# inspect -> String (18135.0) -
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド で文字列に変換されます)。
...self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド
で文字列に変換されます)。
@see Range#to_s
//emlist[例][ruby]{
(1..5).inspect # => "1..5"
("1".."5").inspect # => "\"1\"..\"5\""
//}... -
Net
:: SMTP # inspect -> String (18133.0) -
@see Object#inspect
...@see Object#inspect... -
Method
# inspect -> String (18125.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 (18125.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
Integer
# inspect(base=10) -> String (18119.0) -
整数を 10 進文字列表現に変換します。
...[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数値を指定した場合に発生します。... -
OptionParser
:: ParseError # inspect -> String (18119.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...自身を人間が読みやすい形の文字列表現にして返します。
@return 文字列を返します。
@see Object#inspect...