るりまサーチ

最速Rubyリファレンスマニュアル検索!
453件ヒット [101-200件を表示] (0.152秒)

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 4 ... > >>

UnboundMethod#bind_call(recv, *args) { ... } -> object (9237.0)

self を recv に bind して args を引数として呼び出します。

...self を recv に bind して args を引数として呼び出します。

self.bind(recv).call(*args) と同じ意味です。

//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}

@see UnboundMethod#bind, Method#call...

Method#unbind -> UnboundMethod (9207.0)

self のレシーバとの関連を取り除いた UnboundMethod オブ ジェクトを生成して返します。

...除いた UnboundMethod オブ
ジェクトを生成して返します。

//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
unbound_method = m.unbind # => #<UnboundMethod: Foo#foo>
unbound_method.bind(Foo.new) # => #<Method: Foo#foo>
//}...

Gem::Specification#add_bindir(executables) -> Array | nil (9201.0)

実行コマンドの格納場所を返します。

...実行コマンドの格納場所を返します。

@param executables 実行コマンド名を格納した配列を指定します。...

Gem::Specification#bindir -> String (9201.0)

実行ファイルを格納するディレクトリを返します。

実行ファイルを格納するディレクトリを返します。

TracePoint#binding -> Binding (9201.0)

発生したイベントによって生成された Binding オブジェクトを返します。

...発生したイベントによって生成された Binding オブジェクトを返します。


//emlist[例][ruby]{
def foo(ret)
ret
end
t
race = TracePoint.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
t
race.enable
foo 1
//}...

絞り込み条件を変える

TracePoint#binding -> Binding | nil (9201.0)

発生したイベントによって生成された Binding オブジェクトを返します。

...れた Binding オブジェクトを返します。

C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。

//emlist[例][ruby]{
def foo(ret)
ret
end
t
race = TracePoint.new(:...
...call) do |tp|
p tp.binding.local_variables # => [:ret]
end
t
race.enable
foo 1
//}...

Tracer#trace_func(event, file, line, id, binding, klass, *) -> object | nil (9201.0)

@todo

...@todo...

Binding#local_variable_set(symbol, obj) (9131.0)

引数 symbol で指定した名前のローカル変数に引数 obj を設定します。

.../emlist[例][ruby]{
def foo
a = 1
bind
= binding
bind
.local_variable_set(:a, 2) # set existing local variable `a'
bind
.local_variable_set(:b, 3) # create new local variable `b'
# `b' exists only in binding
p bind.local_variable_get(:a) # => 2
p bind.loca...
...l_variable_get(:b) # => 3
p a # => 2
p b # => NameError
end
//}

このメソッドは以下のコード(ただし、obj が Ruby のコードで出力される場
合)と同様の動作をします。

//emlist[][ruby]{
bind
ing.eval("#{symb...
...ol} = #{obj}")
//}

@see Binding#local_variable_get, Binding#local_variable_defined?...

Binding#local_variable_get(symbol) -> object (9101.0)

引数 symbol で指定した名前のローカル変数に設定された値を返します。

...

//emlist[例][ruby]{
def foo
a = 1
bind
ing.local_variable_get(:a) # => 1
bind
ing.local_variable_get(:b) # => NameError
end
//}

このメソッドは以下のコードの短縮形です。

//emlist[][ruby]{
bind
ing.eval("#{symbol}")
//}

@see Binding#local_variable_set, Binding#local_var...

Binding#source_location -> [String, Integer] (9101.0)

self の Ruby のソースファイル名と行番号を返します。

...self の Ruby のソースファイル名と行番号を返します。

d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。

//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}...

絞り込み条件を変える

Gem::Specification#bindir=(dir) (9101.0)

実行ファイルを格納するディレクトリをセットします。

実行ファイルを格納するディレクトリをセットします。

@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。
<< < 1 2 3 4 ... > >>