569件ヒット
[101-200件を表示]
(0.069秒)
ライブラリ
- English (12)
- ビルトイン (330)
- fiddle (12)
- json (12)
- monitor (12)
- observer (12)
-
rexml
/ document (24) - set (18)
-
webrick
/ httpresponse (12) - win32ole (12)
クラス
-
ARGF
. class (36) - BasicObject (12)
- FalseClass (24)
- Method (24)
- Module (36)
- NilClass (12)
- Object (48)
-
REXML
:: CData (24) - Range (12)
- Thread (24)
-
Thread
:: Backtrace :: Location (24) - TrueClass (12)
- UnboundMethod (12)
-
WEBrick
:: HTTPResponse (12) -
WIN32OLE
_ EVENT (12)
モジュール
- Enumerable (24)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (36)
キーワード
-
$ ERROR _ INFO (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Closure (12)
- Location (12)
- MonitorMixin (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - Numeric (12)
- Observable (12)
- String (12)
-
add
_ trace _ func (12) -
define
_ singleton _ method (24) - handler= (12)
-
http
_ version (12) - inspect (60)
- irb (12)
-
irb
/ completion (12) -
method
_ missing (12) - name (12)
- new (12)
- owner (12)
-
rb
_ class _ path (12) -
ruby 1
. 6 feature (12) -
set
_ trace _ func (24) -
to
_ json (12) -
to
_ set (24) -
to
_ str (12) - tracer (12)
- value (12)
- write (12)
- メソッド呼び出し(super・ブロック付き・yield) (10)
検索結果
先頭5件
-
Method
# to _ s -> String (15131.0) -
self を読みやすい文字列として返します。
...るクラス/モジュール名、
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 Bar.new.method(:bar) # => #<Method: Bar#......ド
obj = ""
class <<obj
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: 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......ocation を表します。
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)#foo() test.rb:2>
p Bar.new.method(:bar)......""
class <<obj
def foo
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 B......ar < 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... -
VALUE rb
_ class _ path(VALUE klass) (6128.0) -
klass の名前を返します.klassが無名クラス、無名モジュー ルの場合 #<Class 0xXXXX>, #<Module 0xXXXX> の形式で返します。
...klass の名前を返します.klassが無名クラス、無名モジュー
ルの場合 #<Class 0xXXXX>, #<Module 0xXXXX> の形式で返します。
Module#to_s の定義は
rb_str_dup(rb_class_path(klass));
です。... -
Object
# to _ str -> String (6112.0) -
オブジェクトの String への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...面で代置可能であるような、
* 文字列そのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_str
'Edition'
end
end
it = Foo.new
p('Second' + it) #=> "SecondEdition"
//}
@see Object#to_s,Kernel.#String... -
Enumerable
# to _ set(klass = Set , *args) -> Set (6106.0) -
Enumerable オブジェクトの要素から、新しい集合オブジェクトを作ります。
...。
//emlist[][ruby]{
require 'set'
p [30, 10, 20].to_set
#=> #<Set: {30, 10, 20}>
p [30, 10, 20].to_set(SortedSet)
#=> #<SortedSet: {10, 20, 30}>
MySet = Class.new(Set)
p [30, 10, 20].to_set(MySet)
#=> #<MySet: {10, 20, 30}>
p [30, 10, 20].to_set {|num| num / 10}
#=> #<Set: {3, 1, 2}>
//}
@see Se......rn 生成された集合オブジェクトを返します。
//emlist[][ruby]{
require 'set'
p [30, 10, 20].to_set
#=> #<Set: {30, 10, 20}>
MySet = Class.new(Set)
p [30, 10, 20].to_set(MySet)
#=> #<MySet: {10, 20, 30}>
p [30, 10, 20].to_set {|num| num / 10}
#=> #<Set: {3, 1, 2}>
//}
@see Set.new......ます。
@return 生成された集合オブジェクトを返します。
//emlist[][ruby]{
p [30, 10, 20].to_set
#=> #<Set: {30, 10, 20}>
MySet = Class.new(Set)
p [30, 10, 20].to_set(MySet)
#=> #<MySet: {10, 20, 30}>
p [30, 10, 20].to_set {|num| num / 10}
#=> #<Set: {3, 1, 2}>
//}
@see Set.new... -
Enumerable
# to _ set(klass = Set , *args) {|o| . . . } -> Set (6106.0) -
Enumerable オブジェクトの要素から、新しい集合オブジェクトを作ります。
...。
//emlist[][ruby]{
require 'set'
p [30, 10, 20].to_set
#=> #<Set: {30, 10, 20}>
p [30, 10, 20].to_set(SortedSet)
#=> #<SortedSet: {10, 20, 30}>
MySet = Class.new(Set)
p [30, 10, 20].to_set(MySet)
#=> #<MySet: {10, 20, 30}>
p [30, 10, 20].to_set {|num| num / 10}
#=> #<Set: {3, 1, 2}>
//}
@see Se......rn 生成された集合オブジェクトを返します。
//emlist[][ruby]{
require 'set'
p [30, 10, 20].to_set
#=> #<Set: {30, 10, 20}>
MySet = Class.new(Set)
p [30, 10, 20].to_set(MySet)
#=> #<MySet: {10, 20, 30}>
p [30, 10, 20].to_set {|num| num / 10}
#=> #<Set: {3, 1, 2}>
//}
@see Set.new......ます。
@return 生成された集合オブジェクトを返します。
//emlist[][ruby]{
p [30, 10, 20].to_set
#=> #<Set: {30, 10, 20}>
MySet = Class.new(Set)
p [30, 10, 20].to_set(MySet)
#=> #<MySet: {10, 20, 30}>
p [30, 10, 20].to_set {|num| num / 10}
#=> #<Set: {3, 1, 2}>
//}
@see Set.new... -
ARGF
. class # write(str) -> Integer (3022.0) -
処理対象のファイルに対して str を出力します。 str が文字列でなければ to_s による文字列化を試みます。 実際に出力できたバイト数を返します。
...して str を出力します。
str が文字列でなければ to_s による文字列化を試みます。
実際に出力できたバイト数を返します。
c:ARGF#inplace時にのみ使用できます。
@param str 出力する文字列を指定します。
@see ARGF.class#to_write_io... -
REXML
:: CData # value -> String (3013.0) -
テキスト文字列を返します。
...テキスト文字列を返します。
@see REXML::Text#value, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}... -
FalseClass
# inspect -> String (3007.0) -
常に文字列 "false" を返します。
...常に文字列 "false" を返します。
//emlist[例][ruby]{
false.to_s # => "false"
//}... -
ARGF
. class # inspect -> String (3001.0) -
常に文字列 "ARGF" を返します。
常に文字列 "ARGF" を返します。