るりまサーチ

最速Rubyリファレンスマニュアル検索!
5823件ヒット [1-100件を表示] (0.143秒)
トップページ > クエリ:t[x] > クエリ:method[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Method#super_method -> Method | nil (24478.0)

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

... Method オブジェ
クトにして返します。

@see UnboundMethod#super_method

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

class Sub < Super
def foo
"subclass method"
end
end

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

Object#method(name) -> Method (24448.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 (24213.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 (24207.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"
//}...

UnboundMethod#super_method -> UnboundMethod | nil (18413.0)

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

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


@see Method#super_method...

絞り込み条件を変える

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

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

...ュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジ...
...method_defined?, Module#public_method_defined?, Module#private_method_defined?

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

A.method_defined? :method1 #=> true
C.protected_met...
...hod_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
//}...

ERB::DefMethod.#def_erb_method(methodname, erb) -> nil (18407.0)

self に erb のスクリプトをメソッドとして定義します。

...をメソッドとして定義します。

メソッド名は methodname で指定します。
erb が文字列の時、そのファイルを読み込み ERB で変換したのち、メソッドとして定義します。

@param methodname メソッド名

@param erb ERBインスタンスもしく...
...はERBソースファイル名

例:

require 'erb'
class Writer
extend ERB::DefMethod
def_erb_method('to_html', 'writer.erb')
...
end
...
puts writer.to_html...

Module#protected_instance_methods(inherited_too = true) -> [Symbol] (18400.0)

そのモジュールで定義されている protected メソッド名 の一覧を配列で返します。

...そのモジュールで定義されている protected メソッド名
の一覧を配列で返します。

@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。


@see Object#protected_methods, Module#instance_methods...

void rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(), int argc) (18316.0)

クラス klass に protected インスタンスメソッド name を 定義します。その実体は関数 func であり、その関数がとる 引数のタイプを argc で指定します。argc のフォーマットに ついては rb_define_method の項を参照してください。

...クラス klass に protected インスタンスメソッド name を
定義します。その実体は関数 func であり、その関数がとる
引数のタイプを argc で指定します。argc のフォーマットに
ついては rb_define_method の項を参照してください。...
<< 1 2 3 ... > >>