642件ヒット
[201-300件を表示]
(0.057秒)
種類
- インスタンスメソッド (420)
- モジュール関数 (108)
- 特異メソッド (60)
- 定数 (54)
ライブラリ
- ビルトイン (204)
-
bigdecimal
/ math (12) - cmath (48)
- delegate (24)
- forwardable (72)
- json (12)
- matrix (24)
- mkmf (24)
- openssl (24)
- pp (12)
- prettyprint (12)
- psych (12)
-
rdoc
/ context (60) -
rdoc
/ top _ level (24) -
rexml
/ sax2listener (12) -
rubygems
/ specification (12) -
shell
/ process-controller (6) - singleton (24)
- tracer (12)
- win32ole (12)
クラス
- BasicObject (48)
- Delegator (24)
-
Gem
:: Specification (12) - Matrix (12)
-
Matrix
:: LUPDecomposition (12) - Module (24)
- Object (72)
-
OpenSSL
:: PKCS7 (12) - PP (12)
- PrettyPrint (12)
-
Psych
:: Nodes :: Scalar (12) -
RDoc
:: Context (60) -
RDoc
:: TopLevel (24) -
Shell
:: ProcessController (6) - Tracer (12)
- WIN32OLE (12)
モジュール
- BigMath (12)
- CMath (48)
- JSON (12)
- Kernel (24)
- Math (48)
-
OpenSSL
:: SSL (12) -
REXML
:: SAX2Listener (12) - SingleForwardable (72)
- Singleton (24)
オブジェクト
- main (12)
キーワード
- MinusInfinity (12)
-
OP
_ SINGLE _ ECDH _ USE (12) -
SINGLE
_ QUOTED (12) - Single (12)
-
USING
_ AT _ EXIT _ WHEN _ PROCESS _ EXIT (6) -
add
_ class (12) -
add
_ class _ or _ module (24) -
add
_ module (12) -
add
_ signer (12) - asin (18)
- asin! (6)
- asinh (18)
- asinh! (6)
-
attribute
_ alias _ singular (12) - clone (12)
-
const
_ missing (12) -
def
_ delegator (12) -
def
_ delegators (12) -
def
_ single _ delegator (12) -
def
_ single _ delegators (12) -
define
_ singleton _ method (24) - delegate (12)
- dup (12)
-
each
_ classmodule (12) -
find
_ class _ named (12) -
method
_ missing (36) -
processing
_ instruction (12) -
respond
_ to _ missing? (24) -
set
_ visibility _ for (12) - sin! (6)
-
single
_ delegate (12) -
singleline
_ format (12) -
singleline
_ pp (12) -
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - singular? (24)
- sinh (18)
- sinh! (6)
-
try
_ link (24) - using (24)
検索結果
先頭5件
-
Object
# define _ singleton _ method(symbol , method) -> Symbol (6118.0) -
self に特異メソッド name を定義します。
...異メソッド name を定義します。
@param symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返......st[][ruby]{
class A
class << self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# respond _ to _ missing?(symbol , include _ private) -> bool (6118.0) -
自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。
...ドに対し
BasicObject#method_missing で反応するつもりならば真を返します。
Object#respond_to? はメソッドが定義されていない場合、
デフォルトでこのメソッドを呼びだし問合せます。
BasicObject#method_missing を override した場合にこの......verride されるべきです。
false を返します。
@param symbol メソッド名シンボル
@param include_private private method も含めたい場合に true が渡されます
//emlist[例][ruby]{
class Sample
def method_missing(name, *args)
if name =~ /^to_*/
[name, *args]......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... -
SingleForwardable
# def _ single _ delegators(accessor , *methods) -> () (6118.0) -
メソッドの委譲先をまとめて設定します。
...メソッドの委譲先をまとめて設定します。
@param accessor 委譲先のオブジェクト
@param methods 委譲するメソッドのリスト
委譲元のオブジェクトで methods のそれぞれのメソッドが呼び出された場合に、
委譲先のオブジェクトの......ef_delegators は def_singleton_delegators の別名になります。
また、以下の 2 つの例は同じ意味です。
def_delegators :@records, :size, :<<, :map
def_delegator :@records, :size
def_delegator :@records, :<<
def_delegator :@records, :map
@see SingleForwardable#def_de... -
OpenSSL
:: SSL :: OP _ SINGLE _ ECDH _ USE -> Integer (6116.0) -
@todo OpenSSL::SSL::SSLContext#options= で利用します。
...@todo
OpenSSL::SSL::SSLContext#options= で利用します。... -
Shell
:: ProcessController :: USING _ AT _ EXIT _ WHEN _ PROCESS _ EXIT -> true (6116.0) -
@todo
...@todo... -
Tracer
:: Single -> Tracer (6116.0) -
@todo
...@todo... -
BasicObject
# singleton _ method _ added(name) -> object (6112.0) -
特異メソッドが追加された時にインタプリタから呼び出されます。
...ます。
@param name 追加されたメソッド名が Symbol で渡されます。
//emlist[例][ruby]{
class Foo
def singleton_method_added(name)
puts "singleton method \"#{name}\" was added"
end
end
obj = Foo.new
def obj.foo
end
#=> singleton method "foo" was added
//}
@see Module#m......ethod_added,BasicObject#singleton_method_removed,BasicObject#singleton_method_undefined... -
BasicObject
# singleton _ method _ removed(name) -> object (6112.0) -
特異メソッドが Module#remove_method に より削除された時にインタプリタから呼び出されます。
...す。
@param name 削除されたメソッド名が Symbol で渡されます。
//emlist[例][ruby]{
class Foo
def singleton_method_removed(name)
puts "singleton method \"#{name}\" was removed"
end
end
obj = Foo.new
def obj.foo
end
class << obj
remove_method :foo
end
#=> singleton m......ethod "foo" was removed
//}
@see Module#method_removed,BasicObject#singleton_method_added,BasicObject#singleton_method_undefined... -
BasicObject
# singleton _ method _ undefined(name) -> object (6112.0) -
特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。
...対するフックには
Module#method_undefined を使います。
@param name 未定義にされたメソッド名が Symbol で渡されます。
//emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end
end
obj = Foo.new......foo
end
def obj.bar
end
class << obj
undef_method :foo
end
obj.instance_eval {undef bar}
#=> singleton method "foo" was undefined
# singleton method "bar" was undefined
//}
@see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef...