別のキーワード
種類
ライブラリ
- ビルトイン (819)
- delegate (44)
- drb (11)
- erb (11)
-
irb
/ output-method (33) - json (77)
-
minitest
/ spec (1) -
minitest
/ unit (1) - objspace (11)
- profiler (6)
- psych (8)
-
rdoc
/ code _ object (11) - singleton (11)
- weakref (11)
- win32ole (352)
クラス
- Array (9)
- BasicObject (66)
- Delegator (44)
- ERB (11)
- Enumerator (44)
-
Enumerator
:: Lazy (44) -
IRB
:: OutputMethod (33) -
JSON
:: State (22) - Method (84)
- Module (119)
- NameError (22)
- NoMethodError (11)
- Object (199)
- Proc (11)
-
RDoc
:: CodeObject (11) - Regexp (22)
- Thread (11)
- TracePoint (6)
- UnboundMethod (21)
- WIN32OLE (33)
-
WIN32OLE
_ METHOD (198) -
WIN32OLE
_ PARAM (77) -
WIN32OLE
_ TYPE (22)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (22) - Kernel (60)
- Marshal (22)
-
MiniTest
:: Assertions (1) - ObjectSpace (11)
オブジェクト
- main (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - === (7)
- BasicObject (11)
- DRbObject (11)
- Method (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - NameError (11)
- NoMethodError (11)
- Object (22)
-
Profiler
_ _ (6) - Ruby プログラムの実行 (11)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- Ruby用語集 (11)
- Singleton (11)
-
WIN32OLE
_ PARAM (11) -
WIN32OLE
_ VARIABLE (11) - WeakRef (11)
-
_ getproperty (11) -
_ invoke (11) - args (11)
-
assert
_ respond _ to (1) -
bind
_ call (10) - call (22)
-
class
_ exec (11) -
count
_ nodes (11) - coverage (7)
- debug (11)
-
def
_ class (11) - default (11)
-
default
_ event _ sources (11) -
define
_ method (22) -
define
_ singleton _ method (22) - dig (9)
- dispid (11)
- dump (22)
- each (44)
-
enum
_ for (44) - eval (22)
- event? (11)
-
event
_ interface (11) - generate (11)
- helpcontext (11)
- helpfile (11)
- input? (11)
- inspect (11)
-
instance
_ eval (22) -
instance
_ method (11) -
instance
_ methods (11) - invkind (11)
-
invoke
_ kind (11) - irb (11)
-
irb
/ completion (11) - lambda (13)
- main (11)
- match (22)
- method (11)
-
method
_ missing (33) - methods (22)
-
module
_ exec (11) -
must
_ respond _ to (1) - name (33)
- new (11)
-
offset
_ vtbl (11) -
ole
_ methods (11) -
ole
_ type (11) -
ole
_ type _ detail (11) - optional? (11)
- parameters (39)
- params (11)
- pp (11)
- ppx (11)
-
private
_ instance _ methods (11) -
private
_ methods (11) - proc (14)
-
protected
_ instance _ methods (11) -
protected
_ methods (22) -
psych
_ yaml _ as (4) - public (23)
-
public
_ instance _ method (11) -
public
_ instance _ methods (11) -
public
_ methods (22) - puts (11)
-
rb
_ obj _ methods (11) -
rb
_ obj _ private _ methods (11) -
rb
_ obj _ protected _ methods (11) -
rb
_ obj _ singleton _ methods (11) - rdoc (11)
- receiver (11)
-
remove
_ methods _ etc (11) -
require
_ relative (11) -
respond
_ to? (11) -
respond
_ to _ missing? (11) -
return
_ type (11) -
return
_ type _ detail (11) -
return
_ vtype (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - send (22)
-
singleton
_ method (11) -
singleton
_ method _ added (11) -
singleton
_ method _ removed (11) -
singleton
_ method _ undefined (11) -
singleton
_ methods (11) -
size
_ opt _ params (11) -
size
_ params (11) -
to
_ enum (44) -
to
_ json (11) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) -
to
_ s (44) - visible? (11)
-
yaml
_ as (4) - クラス/メソッドの定義 (11)
- メソッド呼び出し(super・ブロック付き・yield) (11)
検索結果
先頭5件
-
Object
# public _ methods(include _ inherited = true) -> [Symbol] (27112.0) -
そのオブジェクトが理解できる public メソッド名の一覧を返します。
...が理解できる public メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#public_instance_methods,Object#methods,Object#singleton_methods... -
Object
# enum _ for(method = :each , *args) -> Enumerator (21138.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロック......ule Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if... -
Object
# enum _ for(method = :each , *args) {|*args| . . . } -> Enumerator (21138.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロック......ule Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if... -
Object
# to _ enum(method = :each , *args) -> Enumerator (21138.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロック......ule Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if... -
Object
# to _ enum(method = :each , *args) {|*args| . . . } -> Enumerator (21138.0) -
Enumerator.new(self, method, *args) を返します。
...Enumerator.new(self, method, *args) を返します。
ブロックを指定した場合は Enumerator#size がブロックの評価結果を返
します。ブロックパラメータは引数 args です。
@param method メソッド名の文字列かシンボルです。
@param args 呼び出......すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]
# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}
//emlist[例(ブロック......ule Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n < 0
unless block_given?
# __method__ はここでは :repeat
return to_enum(__method__, n) do
# size メソッドが nil でなければ size * n を返す。
sz = size
sz * n if... -
Object
# send(name , *args) -> object (21132.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...ソッドだけ呼び出せれば良い場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:su......ないことに注意
methods = {1 => :foo,
2 => :bar,
3 => :baz}
# キーを使って関連するメソッドを呼び出す
# レシーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"......p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method... -
Object
# send(name , *args) { . . . . } -> object (21132.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...ソッドだけ呼び出せれば良い場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:su......ないことに注意
methods = {1 => :foo,
2 => :bar,
3 => :baz}
# キーを使って関連するメソッドを呼び出す
# レシーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"......p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method... -
Object
# must _ respond _ to(method _ name) -> true (21107.0) -
自身が与えられたメソッドを持つ場合、検査にパスしたことになります。
...自身が与えられたメソッドを持つ場合、検査にパスしたことになります。
@param method_name メソッド名を指定します。
@raise MiniTest::Assertion 自身が与えられたメソッドを持たない場合に発生します。
@see MiniTest::Assertions#assert_re... -
Object
# respond _ to?(name , include _ all = false) -> bool (21054.0) -
オブジェクトがメソッド name を持つとき真を返します。
...されたメソッドで NotImplementedError が発生する場合は true を返します。
メソッドが定義されていない場合は、Object#respond_to_missing? を呼
び出してその結果を返します。
@param name Symbol または文字列で指定するメソッド名です。......を true か false で指定します。省略した場合
は false(含めない) を指定した事になります。
//emlist[][ruby]{
class F
def hello
"Bonjour"
end
end
class D
private
def hello
"Guten Tag"
end
end
list = [F.new,D.new]
list.each{|it| puts......start
template_method
finish
end
def start
puts "start"
end
def template_method
raise NotImplementedError.new
end
def finish
puts "finish"
end
end
class ImplTemplateMethod
include Template
def template_method
"implement template_method"
end
end
class... -
Object
# respond _ to _ missing?(symbol , include _ private) -> bool (21052.0) -
自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。
...るメソッドに対し
BasicObject#method_missing で反応するつもりならば真を返します。
Object#respond_to? はメソッドが定義されていない場合、
デフォルトでこのメソッドを呼びだし問合せます。
BasicObject#method_missing を override した場......false を返します。
@param symbol メソッド名シンボル
@param include_private private method も含めたい場合に true が渡されます
//emlist[例][ruby]{
class Sample
def method_missing(name, *args)
if name =~ /^to_*/
[name, *args] # => [:to_sample, "sample args1",......end
end
def respond_to_missing?(sym, include_private)
(sym =~ /^to_*/) ? true : super
end
end
s = Sample.new
s.to_sample("sample args1", "sample args2")
s.respond_to?(:to_sample) # => true
s.respond_to?(:sample) # => false
//}
@see Object#respond_to?, BasicObject#method_missing... -
JSON
:: Ext :: Generator :: GeneratorMethods :: Object (21016.0) -
Alias of JSON::Generator::GeneratorMethods::Object
...Alias of JSON::Generator::GeneratorMethods::Object...