るりまサーチ

最速Rubyリファレンスマニュアル検索!
2773件ヒット [1-100件を表示] (0.135秒)

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. matrix d
  4. kernel $-d
  5. rsa d

キーワード

検索結果

<< 1 2 3 ... > >>

Object#method(name) -> Method (24349.0)

オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。

...した
Method
オブジェクトを返します。

@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。

//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#...
...abs>
p me.call #=> 365
//}

@see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method...

Net::HTTPGenericRequest#method -> String (24214.0)

リクエストの HTTP メソッドを文字列で返します。

...リクエストの HTTP メソッドを文字列で返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Post.new(uri.request_uri)
req.method # => "POST"
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}...

Net::HTTPHeader#method -> String (24208.0)

リクエストの HTTP メソッドを文字列で返します。

...リクエストの HTTP メソッドを文字列で返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"
//}...

Method#super_method -> Method | nil (21479.0)

self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。

...るメソッドを Method オブジェ
クトにして返します。

@see UnboundMethod#super_method

//emlist[例][ruby]{
class Super
d
ef foo
"superclass method"
end
end

class Sub < Super
d
ef foo
"subclass method"
end
end

m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call #...
...=> "subclass method"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "superclass method"
//}...

UnboundMethod#super_method -> UnboundMethod | nil (15414.0)

self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ クトにして返します。

...self 内で super を実行した際に実行されるメソッドを UnboundMethod オブジェ
クトにして返します。


@see Method#super_method...

絞り込み条件を変える

Module#protected_method_defined?(name, inherit=true) -> bool (15410.0)

インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。

...り、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュールで
定義さ...
...ます。

@see Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?

//emlist[例][ruby]{
module A
d
ef method1() end
end
class B
protected
d
ef method2() end
end
class C < B
include A
d
ef method3() end
end

A.method_defined? :method1 #...
...=> true
C.protected_method_defined? "method1" #=> false
C.protected_method_defined? "method2" #=> true
C.protected_method_defined? "method2", true #=> true
C.protected_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> true
//}...

Method#unbind -> UnboundMethod (15331.0)

self のレシーバとの関連を取り除いた UnboundMethod オブ ジェクトを生成して返します。

...除いた UnboundMethod オブ
ジェクトを生成して返します。

//emlist[例][ruby]{
class Foo
d
ef foo
"foo"
end
end

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
unbound_method = m.unbind # => #<UnboundMethod: Foo#foo>
unbound_method.bind(Foo.new) # => #<Method: Foo#foo>
//}...

WIN32OLE#ole_method(method) -> WIN32OLE_METHOD (12447.0)

メソッド名を指定して対応するWIN32OLE_METHODオブジェクトを取得しま す。

...OLE_METHODオブジェクトを取得しま
す。

OLEオートメーションの仕様により、メソッド名の大文字、小文字は区別されま
せん。

@param method メソッド情報を取り出す対象のメソッド名を文字列で指定します。
@return WIN32OLE_METHOD...
...meError 指定したメソッド名が未定義あるいは型情報ラ
イブラリ(TypeLib)が提供されていない場合など
に発生します。

excel = WIN32OLE.new('Excel.Application')
method
= excel.ole_method_help('Quit')...

WIN32OLE#ole_method_help(method) -> WIN32OLE_METHOD (12447.0)

メソッド名を指定して対応するWIN32OLE_METHODオブジェクトを取得しま す。

...OLE_METHODオブジェクトを取得しま
す。

OLEオートメーションの仕様により、メソッド名の大文字、小文字は区別されま
せん。

@param method メソッド情報を取り出す対象のメソッド名を文字列で指定します。
@return WIN32OLE_METHOD...
...meError 指定したメソッド名が未定義あるいは型情報ラ
イブラリ(TypeLib)が提供されていない場合など
に発生します。

excel = WIN32OLE.new('Excel.Application')
method
= excel.ole_method_help('Quit')...
<< 1 2 3 ... > >>