るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Method#super_method -> Method | nil (24578.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 (24554.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 (24313.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 (24307.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 (18513.0)

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

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


@see Method#super_method...

絞り込み条件を変える

Module#protected_method_defined?(name, inherit=true) -> bool (18509.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 (18507.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] (18500.0)

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

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

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


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

Module#protected_method_defined?(name) -> bool (18485.0)

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

...が protected であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。

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

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

A.method_defined? :method1 #=> true
C.protected_method_defined? "method1" #=> false
C.protected_method_defined? "method2" #=> true
C.method_defined? "method2" #=> t...

MiniTest::Unit::TestCase.test_methods -> Array (18300.0)

テストメソッドのリストを返します。

...テストメソッドのリストを返します。

MiniTest::Unit::TestCase.test_order の値が :random である場合は
返されるメソッドリストの順番はランダムです。
そうでない場合は、文字コード順にソートされます。...

絞り込み条件を変える

irb/input-method (18000.0)

irb が入力を扱うためのサブライブラリです。

irb が入力を扱うためのサブライブラリです。

ユーザが直接使用するものではありません。

irb/output-method (18000.0)

irb が出力を扱うためのサブライブラリです。

irb が出力を扱うためのサブライブラリです。
<< 1 2 3 ... > >>