1071件ヒット
[1-100件を表示]
(0.043秒)
別のキーワード
ライブラリ
クラス
- Addrinfo (12)
- Array (24)
- BigDecimal (12)
- CSV (12)
-
CSV
:: Row (12) -
CSV
:: Table (12) - Complex (12)
- Data (6)
- Dir (12)
- Encoding (12)
- Exception (12)
- FalseClass (24)
- Float (24)
- Hash (36)
- Integer (24)
- MatchData (12)
- Matrix (12)
- Method (24)
- Module (51)
- Object (36)
- Proc (24)
- Range (24)
- Rational (24)
- Regexp (24)
-
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (12) - Set (20)
- String (24)
- StringScanner (12)
- Struct (24)
- Thread (42)
-
Thread
:: Backtrace :: Location (12) - Time (21)
- TracePoint (12)
- TrueClass (12)
- UnboundMethod (36)
-
WIN32OLE
_ EVENT (12)
モジュール
- Kernel (132)
キーワード
- % (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) - Numeric (12)
- Thread (12)
- [] (12)
- ` (12)
- abort (24)
-
bind
_ call (12) - cgi (12)
-
const
_ added (3) -
const
_ missing (12) -
default
_ proc (12) -
drb
/ gw (12) - exit (12)
- format (12)
- handler= (12)
-
initialize
_ copy (12) - irb (12)
- name (12)
- name= (10)
- new (24)
- now (3)
- p (12)
-
pretty
_ print (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 8 . 5 feature (12) -
ruby 1
. 9 feature (12) - sprintf (12)
- sprintf フォーマット (12)
-
to
_ s (175) -
trace
_ var (36) -
untrace
_ var (12) - クラス/メソッドの定義 (12)
- スレッド (12)
- パターンマッチ (12)
検索結果
先頭5件
-
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (21113.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 (21113.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
Object
# inspect -> String (18143.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... -
Complex
# inspect -> String (18137.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...st[例][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 # => "... -
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\""
//}... -
MatchData
# inspect -> String (18131.0) -
self の内容を人間に読みやすい文字列にして返します。
...mlist[例][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
# => #<Mat... -
Method
# inspect -> String (18131.0) -
self を読みやすい文字列として返します。
...式の文字列を返します。
#<Method: klass1(klass2)#method> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......、実際にそのメソッドを定義しているクラス/モジュール名、
method は、メソッド名を表します。
//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......式では klass1 はレシーバ、
klass2 は実際にそのメソッドを定義しているオブジェクトになります。
//emlist[例][ruby]{
# オブジェクトの特異メソッド
obj = ""
class <<obj
def foo
end
end
p obj.method(:foo) # => #<Method: "".foo>
# クラスメ......の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......します。
「foo.rb:2」は Method#source_location を表します。
source_location が nil の場合には付きません。
//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)#f......式では klass1 はレシーバ、
klass2 は実際にそのメソッドを定義しているオブジェクトになります。
//emlist[例][ruby]{
# オブジェクトの特異メソッド
obj = ""
class <<obj
def foo
end
end
p obj.method(:foo) # => #<Method: "".foo() foo.rb:4>
# ク... -
Rational
# inspect -> String (18131.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... -
StringScanner
# inspect -> String (18131.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 # => "#<StringScanner fin>"
//}...