890件ヒット
[201-300件を表示]
(0.048秒)
別のキーワード
ライブラリ
- ビルトイン (168)
-
bigdecimal
/ math (12) - delegate (24)
- etc (12)
- forwardable (84)
- getoptlong (12)
- json (12)
- matrix (24)
-
net
/ http (8) - openssl (36)
- optparse (12)
- pp (12)
- prettyprint (12)
- psych (12)
-
rdoc
/ context (84) -
rdoc
/ parser / ruby (12) -
rdoc
/ single _ class (12) -
rdoc
/ top _ level (48) -
rexml
/ sax2listener (12) - rss (24)
- rubygems (24)
-
rubygems
/ specification (12) -
shell
/ process-controller (6) - singleton (48)
- tracer (12)
- win32ole (12)
クラス
- BasicObject (48)
- Delegator (24)
-
Gem
:: Specification (12) - Matrix (12)
-
Matrix
:: LUPDecomposition (12) - Module (36)
- Object (72)
-
OpenSSL
:: PKCS7 (12) - PP (12)
- PrettyPrint (12)
-
Psych
:: Nodes :: Scalar (12) -
RDoc
:: Context (84) -
RDoc
:: Parser :: Ruby (12) -
RDoc
:: TopLevel (48) -
Shell
:: ProcessController (6) - Tracer (12)
- WIN32OLE (12)
モジュール
- BigMath (12)
- Etc (12)
-
Gem
:: QuickLoader (24) -
OpenSSL
:: SSL (24) -
REXML
:: SAX2Listener (12) - SingleForwardable (72)
- Singleton (36)
オブジェクト
- main (12)
キーワード
- HTTPProcessing (8)
- MissingArgument (24)
- MissingAttributeError (12)
- MissingTagError (12)
- MissingUnicodeSupport (12)
-
OP
_ SINGLE _ DH _ USE (12) -
OP
_ SINGLE _ ECDH _ USE (12) -
SC
_ MESSAGE _ PASSING (12) - SINGLE (12)
-
SINGLE
_ QUOTED (12) - Single (12)
- SingleClass (12)
- SingleForwardable (12)
- Singleton (12)
-
USING
_ AT _ EXIT _ WHEN _ PROCESS _ EXIT (6) -
add
_ class (12) -
add
_ class _ or _ module (24) -
add
_ module (12) -
add
_ signer (12) -
all
_ classes _ and _ modules (12) -
attribute
_ alias _ singular (12) - bigdecimal (12)
-
bigdecimal
/ math (12) - classes (12)
- clone (12)
-
const
_ missing (24) -
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) -
find
_ enclosing _ module _ named (12) -
find
_ local _ symbol (12) - instance (12)
-
method
_ missing (48) -
processing
_ instruction (12) -
rb
_ define _ singleton _ method (12) -
rb
_ f _ missing (12) -
rb
_ obj _ singleton _ methods (12) -
rb
_ singleton _ class (12) -
rb
_ singleton _ class _ attached (12) -
rb
_ singleton _ class _ clone (12) -
rb
_ singleton _ class _ new (12) -
rdoc
/ single _ class (12) -
respond
_ to _ missing? (24) -
run
_ single _ final (12) -
set
_ visibility _ for (12) -
single
_ delegate (12) -
singleline
_ format (12) -
singleline
_ pp (12) - singleton (12)
-
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - singular? (24)
- using (24)
検索結果
先頭5件
-
Object
# define _ singleton _ method(symbol , method) -> Symbol (12200.0) -
self に特異メソッド name を定義します。
...self に特異メソッド name を定義します。
@param symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Sy......t[][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 (12200.0) -
自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。
...ドに対し
BasicObject#method_missing で反応するつもりならば真を返します。
Object#respond_to? はメソッドが定義されていない場合、
デフォルトでこのメソッドを呼びだし問合せます。
BasicObject#method_missing を override した場合にこの......_missing(name, *args)
if name =~ /^to_*/
[name, *args] # => [:to_sample, "sample args1", "sample args2"]
return
else
super
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... -
Object
# singleton _ class -> Class (12200.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
...返します。
@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。
//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class #=> NilClass
//}
@see Object#class... -
Object
# singleton _ method(name) -> Method (12200.0) -
オブジェクトの特異メソッド name をオブジェクト化した Method オブ ジェクトを返します。
...異メソッド name をオブジェクト化した Method オブ
ジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
clas......)
"Hello, @iv = #{@iv}"
end
end
k = Demo.new(99)
def k.hi
"Hi, @iv = #{@iv}"
end
m = k.singleton_method(:hi) # => #<Method: #<Demo:0xf8b0c3c4 @iv=99>.hi>
m.call #=> "Hi, @iv = 99"
m = k.singleton_method(:hello) # => NameError
//}
@see Module#instance_method, Method, BasicObject#__send... -
Object
# singleton _ methods(inherited _ too = true) -> [Symbol] (12200.0) -
そのオブジェクトに対して定義されている特異メソッド名 (public あるいは protected メソッド) の一覧を返します。
...や、
self がクラスの場合はスーパークラスのクラスメソッド(Classのインスタンスの特異メソッド)などです。
singleton_methods(false) は、Object#methods(false) と同じです。
@param inherited_too 継承した特異メソッドを含める場合は真を......end
public; def public_self() end
end
# あるオブジェクトの特異メソッドの一覧を得る。
p obj.singleton_methods(false)
p obj.methods(false)
p Foo.singleton_methods(false)
#実行結果
[:protected_self, :public_self]
[:protected_self, :public_self]
[:protected_class_foo......れるよう true を指定したが、
# Object のクラスメソッドは一覧から排除している。
p obj.singleton_methods(true)
p Foo.singleton_methods(true) - Object.singleton_methods(true)
#実行結果
[:protected_self, :public_self, :protected_bar, :public_bar]
[:protected_class_f... -
OpenSSL
:: SSL :: OP _ SINGLE _ DH _ USE -> Integer (12200.0) -
一時的 DH 鍵を使うとき毎回鍵を生成するフラグです。
...成するフラグです。
このオプションは「安全でない」素数を使って DH パラメータを
生成したときに「small subgroup attack」を防ぐために必要です。
「安全な」素数を使った場合は必ずしも必要なオプションでは
ありませんが... -
OpenSSL
:: SSL :: OP _ SINGLE _ ECDH _ USE -> Integer (12200.0) -
@todo OpenSSL::SSL::SSLContext#options= で利用します。
@todo
OpenSSL::SSL::SSLContext#options= で利用します。 -
PP
. singleline _ pp(obj , out= $ >) -> object (12200.0) -
指定されたオブジェクト obj を出力先 out に出力します。 ただし、インデントも改行もしません。 出力先 out を返します。
指定されたオブジェクト obj を出力先 out に出力します。
ただし、インデントも改行もしません。
出力先 out を返します。
@param obj 表示したいオブジェクトを指定します。
@param out 出力先を指定します。<< メソッドが定義されている必要があります。 -
PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (12200.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。
...れを引数としてブロックを実行します。
PrettyPrint.format に似ていますが、改行しません。
引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text の実行であるかのように扱います。
@......param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 無視されます。
@param newline 無視されます。
@param genspace 無視されます。...