1088件ヒット
[1-100件を表示]
(0.146秒)
別のキーワード
ライブラリ
- ビルトイン (611)
- bigdecimal (12)
- csv (36)
- ipaddr (12)
-
irb
/ context (72) -
irb
/ inspector (24) -
irb
/ output-method (24) - matrix (24)
-
minitest
/ unit (1) -
net
/ smtp (12) - openssl (36)
- optparse (12)
- ostruct (24)
- pp (36)
- rake (36)
-
rdoc
/ context (12) - set (14)
-
shell
/ filter (6) - socket (24)
- strscan (12)
- sync (6)
- thwait (6)
-
win32
/ registry (12) - win32ole (12)
- zlib (12)
クラス
-
ARGF
. class (24) - Addrinfo (12)
- Array (24)
- BigDecimal (12)
- Bignum (6)
- CSV (12)
-
CSV
:: Row (12) -
CSV
:: Table (12) - 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)
- IPAddr (12)
-
IRB
:: Context (72) -
IRB
:: Inspector (24) -
IRB
:: OutputMethod (24) - Integer (24)
- MatchData (12)
- Matrix (12)
- Method (24)
- Module (36)
-
Net
:: SMTP (12) - Object (60)
-
OpenSSL
:: HMAC (36) - OpenStruct (24)
-
OptionParser
:: ParseError (12) - Proc (24)
-
Process
:: Status (12) -
RDoc
:: Context :: Section (12) -
Rake
:: Task (12) -
Rake
:: TaskArguments (24) - Range (12)
- Rational (12)
- Regexp (24)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (12) - Set (20)
-
Shell
:: Filter (6) -
Socket
:: Ifaddr (12) - String (24)
- StringScanner (12)
- Struct (24)
- Symbol (12)
- Thread (32)
-
Thread
:: Backtrace :: Location (12) - ThreadsWait (6)
- Time (6)
- TracePoint (12)
- TrueClass (12)
- UnboundMethod (24)
- Vector (12)
-
WIN32OLE
_ TYPE (12) -
Win32
:: Registry (12) -
Zlib
:: GzipFile :: Error (12)
モジュール
-
MiniTest
:: Assertions (1) -
Sync
_ m (6)
キーワード
- % (12)
- [] (12)
-
_ _ inspect _ _ (12) -
all
_ waits (6) -
default
_ proc (12) - hexdigest (12)
- init (12)
-
initialize
_ copy (12) - inspect? (12)
-
inspect
_ mode (12) -
inspect
_ mode= (12) -
inspect
_ sockaddr (12) -
inspect
_ value (12) -
mu
_ pp (1) - name (12)
- pp (12)
- ppx (12)
-
pretty
_ inspect (12) -
pretty
_ print (12) -
pretty
_ print _ inspect (12) -
sync
_ inspect (6) -
to
_ s (217)
検索結果
先頭5件
-
OpenStruct
# inspect -> String (27208.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect... -
WIN32OLE
_ TYPE # inspect -> String (27208.0) -
selfを説明的な文字列で表現します。
...ます。
@return "#<WIN32OLE_TYPE"とWIN32OLE_TYPE#to_sの結果を「:」で結合
し、「>」で閉じた文字列を返します。
x = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
puts x.inspect #=> #<WIN32OLE_TYPE:Worksheet>
@see WIN32OLE_TYPE#to_s... -
Method
# inspect -> String (24256.0) -
self を読みやすい文字列として返します。
...式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......します。
//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo>
p Bar.new.method(:bar) # => #<Method: Bar#bar>
//}
klass1 と klass2 が同じ場合は以下の形式になり......bj
def foo
end
end
p obj.method(:foo) # => #<Method: "".foo>
# クラスメソッド(クラスの特異メソッド)
class Foo
def Foo.foo
end
end
p Foo.method(:foo) # => #<Method: Foo.foo>
# スーパークラスのクラスメソッド
class Bar < Foo
end
p Bar.method(:foo)......の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......//emlist[例][ruby]{
module Foo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以......end
end
p obj.method(:foo) # => #<Method: "".foo() foo.rb:4>
# クラスメソッド(クラスの特異メソッド)
class Foo
def Foo.foo
end
end
p Foo.method(:foo) # => #<Method: Foo.foo() foo.rb:11>
# スーパークラスのクラスメソッド
class Bar < Foo
end
p Bar.metho... -
Module
# inspect -> String (24250.0) -
モジュールやクラスの名前を文字列で返します。
...P」が挙げられます。
@return 名前のないモジュール / クラスに対しては、name は nil を、それ以外はオブジェクト ID の文字列を返します。
//emlist[例][ruby]{
module A
module B
end
p B.name #=> "A::B"
class C
end
end
p A.name #=> "A"
p......A::B.name #=> "A::B"
p A::C.name #=> "A::C"
# 名前のないモジュール / クラス
p Module.new.name #=> nil
p Class.new.name #=> nil
p Module.new.to_s #=> "#<Module:0x00007f90b09112c8>"
p Class.new.to_s #=> "#<Class:0x00007fa5c40b41b0>"
//}... -
Object
# inspect -> String (24244.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...み込み関数 Kernel.#p は、このメソッドの結果を使用して
オブジェクトを表示します。
//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... -
Complex
# inspect -> String (24232.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...][ruby]{
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+N... -
Range
# inspect -> String (24230.0) -
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド で文字列に変換されます)。
...self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド
で文字列に変換されます)。
@see Range#to_s
//emlist[例][ruby]{
(1..5).inspect # => "1..5"
("1".."5").inspect # => "\"1\"..\"5\""
//}... -
Integer
# inspect(base=10) -> String (24226.0) -
整数を 10 進文字列表現に変換します。
...を基数とした文字列表
現に変換します。
//emlist[][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... -
MatchData
# inspect -> String (24226.0) -
self の内容を人間に読みやすい文字列にして返します。
...st[例][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
# => #<MatchD...