るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. bigdecimal to_r
  5. fileutils cp_r

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

Rake::FileList#include(*filenames) -> self (21314.0)

ファイル名のパターンを追加リストに登録します。 配列が与えられた場合、配列の各要素が追加されます。

...ターンを追加リストに登録します。
配列が与えられた場合、配列の各要素が追加されます。

@param filenames 追加するファイル名のパターンを指定します。

例:
file_list.include("*.java", "*.cfg")
file_list.include %w( math.c lib.h *.o )...

CGI::QueryExtension#include?(*args) -> bool (6402.0)

与えられたキーがクエリに含まれている場合は、真を返します。 そうでない場合は、偽を返します。

...与えられたキーがクエリに含まれている場合は、真を返します。
そうでない場合は、偽を返します。

@param args キーを一つ以上指定します。...

Object#respond_to_missing?(symbol, include_private) -> bool (6326.0)

自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。

...

Object#respond_to? はメソッドが定義されていない場合、
デフォルトでこのメソッドを呼びだし問合せます。

BasicObject#method_missing を override した場合にこのメソッドも
override されるべきです。

false を返します。

@param symbol...
...ボル
@param include_private private method も含めたい場合に true が渡されます

//emlist[例][ruby]{
class Sample
def method_missing(name, *args)
if name =~ /^to_*/
[name, *args] # => [:to_sample, "sample args1", "sample args2"]
r
eturn
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...

Refinement#import_methods(*modules) -> self (6313.0)

モジュールからメソッドをインポートします。

...ドをインポートします。

Module#includeと違って、import_methods はメソッドをコピーして
r
efinement に追加して、refinementでインポートしたメソッドを有効化します。

メソッドをコピーするため、Rubyコードで定義されたメソッドだ...
...][ruby]{
module StrUtils
def indent(level)
' ' * level + self
end
end

module M
r
efine String do
import_methods StrUtils
end
end

using M
p "foo".indent(3) # => " foo"

module M
r
efine String do
import_methods Enumerable
# Can't import method which is not defined with Rub...
...y code: Enumerable#drop
end
end
//}...

Kernel#try_cpp(src, opt = "", *opts) -> bool (6309.0)

C プログラムのソースコード src をプリプロセスします。

...ムのソースコード src をプリプロセスします。

$CPPFLAGS, $CFLAGS の値もプリプロセッサにコマンドライン引数
として渡します。

このメソッドはヘッダファイルの存在チェックなどに使用します。

@param src C プログラムのソー...
...@param opt プリプロセッサにコマンドライン引数として渡す値を指定します。

@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。

例:

r
equire 'mkmf'
if try_cpp("#include <s...
...tdio.h>")
$stderr.puts "stdio.h exists"
end...

絞り込み条件を変える

Kernel#try_cpp(src, opt = "", *opts) { ... } -> bool (6309.0)

C プログラムのソースコード src をプリプロセスします。

...ムのソースコード src をプリプロセスします。

$CPPFLAGS, $CFLAGS の値もプリプロセッサにコマンドライン引数
として渡します。

このメソッドはヘッダファイルの存在チェックなどに使用します。

@param src C プログラムのソー...
...@param opt プリプロセッサにコマンドライン引数として渡す値を指定します。

@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。

例:

r
equire 'mkmf'
if try_cpp("#include <s...
...tdio.h>")
$stderr.puts "stdio.h exists"
end...

Module#ruby2_keywords(method_name, ...) -> nil (6229.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.

...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 argument...
...ash 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...
...other methods.

This should only be used for methods 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 version...

Proc#ruby2_keywords -> proc (6229.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc 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 proc to other methods.

...Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked...
...ormal 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 proc to other methods.

This should only be used for procs that delegate keyword...
...s 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 proc responds to this method before calling
it...

WEBrick::HTTPServer#mount(dir, servlet, *options) -> () (3308.0)

サーバ上のディレクトリ dir にサーブレット servlet を対応させます。

...のディレクトリ dir にサーブレット servlet を対応させます。

@param dir ディレクトリをあらわす文字列を指定します。

@param servlet WEBrick::HTTPServlet::AbstractServlet のサブクラスのインスタンスを指定します。

@param options サーブレ...
...ットのコンストラクタの引数を指定します。

r
equire 'webrick'
include
WEBrick
srv = HTTPServer.new( { :BindAddress => '127.0.0.1', :Port => 10080 } )
srv.mount('/img', WEBrick::HTTPServlet::FileHandler, '/home/username/images')...

REXML::Parsers::SAX2Parser#listen(ary) { ... } -> () (3303.0)

コールバックをパーサに登録します。

...ブロックを指定した場合はそのブロックがコールバックされます。
ブロックを指定しない場合は REXML::SAX2Listener include した
クラスのオブジェクトを指定します。

sym は以下のシンボルが指定でき、どの場合にコールバ...
...
R
EXML::SAX2Listener の対応するメソッドで詳しく説明されていますので
そちらを参照してください。

*
:start_document
(XML文書開始, REXML::SAX2Listener#start_document)
*
:end_document
(XML文書終了, REXML::SAX2Listener#end_document)
*
:start_el...
..., REXML::SAX2Listener#start_element)
*
:end_element
(要素終了, REXML::SAX2Listener#end_element)
*
:start_prefix_mapping
(名前空間接頭辞導入, REXML::SAX2Listener#start_prefix_mapping)
*
:end_prefix_mapping
(名前空間接頭辞適用終了, REXML::SAX2Listener#end_pref...

絞り込み条件を変える

REXML::Parsers::SAX2Parser#listen(ary, listener) -> () (3303.0)

コールバックをパーサに登録します。

...ブロックを指定した場合はそのブロックがコールバックされます。
ブロックを指定しない場合は REXML::SAX2Listener include した
クラスのオブジェクトを指定します。

sym は以下のシンボルが指定でき、どの場合にコールバ...
...
R
EXML::SAX2Listener の対応するメソッドで詳しく説明されていますので
そちらを参照してください。

*
:start_document
(XML文書開始, REXML::SAX2Listener#start_document)
*
:end_document
(XML文書終了, REXML::SAX2Listener#end_document)
*
:start_el...
..., REXML::SAX2Listener#start_element)
*
:end_element
(要素終了, REXML::SAX2Listener#end_element)
*
:start_prefix_mapping
(名前空間接頭辞導入, REXML::SAX2Listener#start_prefix_mapping)
*
:end_prefix_mapping
(名前空間接頭辞適用終了, REXML::SAX2Listener#end_pref...
<< 1 2 > >>