るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

ライブラリ

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

RubyVM::InstructionSequence#label -> String (21225.0)

self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。

..."<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。

例1:irb で実行した場合

i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
i
seq.label
# => "<compiled>"...
...例2: RubyVM::InstructionSequence.compile_file を使用した場合

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

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, worl...
...d"
end

RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"

@see RubyVM::InstructionSequence#base_label...

Thread::Backtrace::Location#label -> String (21213.0)

self が表すフレームのラベルを返します。通常、メソッド名、クラス名、モ ジュール名などで構成されます。

...フレームのラベルを返します。通常、メソッド名、クラス名、モ
ジュール名などで構成されます。

例: Thread::Backtrace::Location の例1を用いた例

//emlist[][ruby]{
loc = c(0..1).first
loc.label # => "a"
//}

@see Thread::Backtrace::Location#base_label...

Benchmark::Tms#label -> String (18201.0)

ラベル。

ラベル。

RDoc::Markup::LABEL_LIST_RE -> Regexp (12201.0)

ラベル付きリストにマッチする正規表現です。ライブラリの内部で使用します。

ラベル付きリストにマッチする正規表現です。ライブラリの内部で使用します。

Thread::Backtrace::Location#base_label -> String (9229.0)

self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。

...ocation#label から修飾を取り除いたもので構成
されます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.base_label
end

# => initialize...
...# new
# <main>
//}

@see Thread::Backtrace::Location#label...

絞り込み条件を変える

RubyVM::InstructionSequence#base_label -> String (9225.0)

self が表す命令シーケンスの基本ラベルを返します。

...ラベルを返します。

例1:irb で実行した場合

i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
i
seq.base_label
# => "<compiled>"

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

# /tmp/me...
...# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

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

RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"

@see RubyVM::InstructionSequence#label...

RubyVM::InstructionSequence#inspect -> String (9206.0)

self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。

...んだ人間に読みやすい文字列にして返します。

//emlist[例][ruby]{
i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
i
seq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}

@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path...

main.using(module) -> self (9106.0)

引数で指定したモジュールで定義された拡張を有効にします。

...inements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
end
end

"ABC".downcase # => "abc"

using Sloth

"ABC".downcase # => "ABC"
//}

@see Module#refine, Module#usi...

Benchmark::Job#item(label = "") { ... } -> self (6208.0)

与えられたラベルとブロックをジョブリストに登録します。

...与えられたラベルとブロックをジョブリストに登録します。

@param label ラベル...

Benchmark::Report#item(label = "", *fmt) { ... } -> Benchmark::Tms (6208.0)

ラベルと与えられたブロックの実行時間を標準出力に出力します。

...ラベルと与えられたブロックの実行時間を標準出力に出力します。

出力のフォーマットは Benchmark::Tms#format が行います。

@param label ラベル
@param fmt 結果に出力したいオブジェクト

@see Benchmark::Tms#format...

絞り込み条件を変える

<< 1 2 3 ... > >>