るりまサーチ

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

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. l matrix

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

MatchData#end(n) -> Integer | nil (18244.0)

n 番目の部分文字列終端のオフセットを返します。

...il を返します。

@param n 部分文字列を指定する数値。

@raise IndexError 範囲外の n を指定した場合に発生します。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end(...
...4) # => `end': index 4 out of matches (IndexError)
//}

@see MatchData#begin...

Gem::Specification#add_development_dependency(gem, *requirements) -> [Gem::Dependency] (12307.0)

この gem の DEVELOPMENT 依存性を追加します。 この gem の開発時に必要となる gem を指定します。

...この gem の DEVELOPMENT 依存性を追加します。
この gem の開発時に必要となる gem を指定します。

//emlist[][ruby]{
gem "rack", "~> 1.6", ">= 1.6.12"
//}

@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。

@param require...
...ments バージョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。

@see Gem::Specification#add_runtime_dependency, Gem::Dependency...

Range#exclude_end? -> bool (12220.0)

範囲オブジェクトが終端を含まないとき真を返します。

...範囲オブジェクトが終端を含まないとき真を返します。

//emlist[例][ruby]{
(1..5).exclude_end? # => false
(1...5).exclude_end? # => true
//}...

Object#public_send(name, *args) -> object (12213.0)

オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。

...の public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}

@param name 文字列かSymbol で指...
...しなかった場合に発生します。

@raise NoMethodError protected メソッドや private メソッドに対して実行
した場合に発生します。

//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}

@see BasicObject#__send__, Object#send...

Object#public_send(name, *args) { .... } -> object (12213.0)

オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。

...の public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。

ブロック付きで呼ばれたときはブロックもそのまま引き渡します。

//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}

@param name 文字列かSymbol で指...
...しなかった場合に発生します。

@raise NoMethodError protected メソッドや private メソッドに対して実行
した場合に発生します。

//emlist[][ruby]{
1.public_send(:puts, "hello") # => NoMethodError
//}

@see BasicObject#__send__, Object#send...

絞り込み条件を変える

Module#prepend(*modules) -> self (9255.0)

指定したモジュールを self の継承チェインの先頭に「追加する」ことで self の定数、メソッド、モジュール変数を「上書き」します。

...ールを self の継承チェインの先頭に「追加する」ことで
self の定数、メソッド、モジュール変数を「上書き」します。

継承チェイン上で、self のモジュール/クラスよりも「手前」に
追加されるため、結果として self で定義...
...メソッドは
override されます。

modules で指定したモジュールは後ろから順に処理されるため、
modules の先頭が最も優先されます。

また、継承によってこの「上書き」を処理するため、prependの引数として
渡したモジュールの...
...スメソッドでsuperを呼ぶことで
self のモジュール/クラスのメソッドを呼び出すことができます。

実際の処理は modules の各要素の prepend_features を後ろから順に呼びだすだけです。
Module#prepend_features が継承チェインの改変を実...

Module#ruby2_keywords(method_name, ...) -> nil (9244.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...hrough
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the final hash argument is marked with a special
flag such that...
...is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
other methods.

This should only be used fo...
...ethods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to...

Module#prepend_features(mod) -> self (9243.0)

Module#prepend から呼び出されるメソッドで、 prepend の処理の実体です。このメソッド自体は mod で指定した モジュール/クラスの継承チェインの先頭に self を追加します。

...Module#prepend から呼び出されるメソッドで、
prepend の処理の実体です。このメソッド自体は mod で指定した
モジュール/クラスの継承チェインの先頭に self を追加します。

このメソッドを上書きすることで、prepend の処理を変...
...m mod prepend を呼び出したモジュール
@return mod が返されます

//emlist[例][ruby]{
class Recorder
RECORDS = []
end


module X
def self.prepend_features(mod)
Recorder::RECORDS << mod
end

end


class A
prepend X
end


class B
include X
end


class C
prepend X
end


Recorde...
...r::RECORDS # => [A, C]
//}

@see Module#prepend, Module#prepended...

Symbol#end_with?(*suffixes) -> bool (9238.0)

self の末尾が suffixes のいずれかであるとき true を返します。

...self の末尾が suffixes のいずれかであるとき true を返します。

(self.to_s.end_with?と同じです。)

@param suffixes パターンを表す文字列 (のリスト)

@see Symbol#start_with?

@see String#end_with?

//emlist[][ruby]{
:hello.end_with?("ello") #=> tru...
...e

# returns true if one of the +suffixes+ matches.
:hello.end_with?("heaven", "ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}...

Class#subclasses -> [Class] (9231.0)

自身が直接のスーパークラスになっている(特異クラスを除く)クラスの配列を返します。 返り値の配列の順序は未定義です。

...を除く)クラスの配列を返します。
返り値の配列の順序は未定義です。

//emlist[例][ruby]{
class A; end
class B < A; end
class C < B; end
class D < A; end

A.subclasses # => [D, B]
B.subclasses # => [C]
C.subclasses # => []
//}

@see Class#superclass...

絞り込み条件を変える

WIN32OLE#ole_query_interface(iid) -> WIN32OLE (9231.0)

IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。

...したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。

ie = WIN32OLE.new('InternetExplorer.Application')
ie_web_app = ie.ole_query_interface('{0002DF05-0000-0000-C000-000...
...、正しく実装されたOLEオートメーションサーバでは本メソッドが意味
を持つことはありません。というのは、2つ以上の異なるWIN32OLEで操作可能な
インターフェイスを持つということは、IID_IDispatch(OLEオートメーション
...
...イスを呼び出す可能性を持つということを意
味します。当然、それはサーバ実装のバグです。

問題は、C++のvtblアクセスや.NET FrameworkのCOM Interopのために静的型情
報が必要となることです。このため、一度あるインターフェ...
<< 1 2 3 ... > >>