るりまサーチ

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. socket udp_server_loop_on
  5. thread abort_on_exception

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (21238.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...RubyVM::InstructionSequence オブジェクトを作成して返します。

@param body Proc、Method オブジェクトを指定します。

例1:irb で実行した場合

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in...
...tructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/iseq_of.rb
def hello
puts "hello, world"
end

$a_global_proc = proc { str = 'a' + 'b' }

# irb
> require '/tmp/iseq_of.rb'...
...# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>

# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x007fb73d7caf78>...

FileUtils.options_of(mid) -> Array (12208.0)

与えられたメソッド名で使用可能なオプション名の配列を返します。

...与えられたメソッド名で使用可能なオプション名の配列を返します。

@param mid メソッド名を指定します。

//emlist[][ruby]{
require 'fileutils'
FileUtils.options_of(:rm) # => ["noop", "verbose", "force"]
//}...

Tracer.off -> nil (6123.0)

トレース出力を中断します。 トレース出力を開始するには、Tracer.onを使用します。

...トレース出力を中断します。
トレース出力を開始するには、Tracer.onを使用します。

@see Tracer.on...

Socket::Option.linger(onoff, secs) -> Socket::Option (3301.0)

SOL_SOCKET/SO_LINGER 用の Socket::Option オブジェクト を新たに生成し返します。

...SOL_SOCKET/SO_LINGER 用の Socket::Option オブジェクト
を新たに生成し返します。

@param onoff 0/1もしくは真偽値
@param secs 整数値...

JSON::State.new(options = {}) -> JSON::State (3207.0)

自身を初期化します。

...初期化します。

@param options ハッシュを指定します。
指定可能なオプションは以下の通りです。

: :indent
インデントに使用する文字列を指定します。デフォルトは空文字列です。
: :space
JSON 形式の文字列のトークン...
...トは空文字列です。
: :space_before
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の
前に挿入する文字列をセットします。デフォルトは空文字列です。
: :object_nl
JSON 形式の文字列中に現れる JavaScript...
...のオブジェクトの行末に挿入する文字列を指定します。
デフォルトは空文字列です。
: :array_nl
JSON 形式の文字列中に現れる JavaScript の配列の行末に挿入する文字列を指定します。
デフォルトは空文字列です。
: :check_cir...

絞り込み条件を変える

DateTime.civil(year = -4712, mon = 1, mday = 1, hour = 0, min = 0, sec = 0, offset = 0, start = Date::ITALY) -> DateTime (201.0)

暦日付に相当する日時オブジェクトを生成します。

...降では、"+0900" のような時差をあらわす文字列もつかえます。

@param year 年
@param mon
@param mday 日
@param hour 時
@param min 分
@param sec 秒
@param offset 時差
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日
@raise Argument...

DateTime.new(year = -4712, mon = 1, mday = 1, hour = 0, min = 0, sec = 0, offset = 0, start = Date::ITALY) -> DateTime (201.0)

暦日付に相当する日時オブジェクトを生成します。

...降では、"+0900" のような時差をあらわす文字列もつかえます。

@param year 年
@param mon
@param mday 日
@param hour 時
@param min 分
@param sec 秒
@param offset 時差
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日
@raise Argument...

CSV.new(data, options = Hash.new) -> CSV (119.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...ンスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。

@param options CSV をパースするためのオプションをハッシュで指定します。
パフォーマンス上の理由でインスタ...
...If none of those sequences is
found, +data+ is ARGF, Object::STDIN, Object::STDOUT, or
Object::STDERR, or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
n
ote...
...that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read ahead. This String will be transcoded into the data's Encoding before parsing.
:...

IO.binread(path, length = nil, offset = 0) -> String | nil (113.0)

path で指定したファイルを open し、offset の所まで seek し、 length バイト読み込みます。

...path で指定したファイルを open し、offset の所まで seek し、
length バイト読み込みます。

Kernel.#open と同様 path の先頭が "|" ならば、"|" に続くコマンドの出力を読み取ります。

length を省略するとファイルの末尾まで読み込み...
...his is line one\nThis is line two\nThis is line three\nAnd so on...\n")
IO.binread("testfile") # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
IO.binread("testfile", 20) # => "This is line one\nThi"
IO.binread("testfile", 20, 10) # => "ne one\nThis is...
<< 1 2 > >>