500件ヒット
[201-300件を表示]
(0.075秒)
ライブラリ
- ビルトイン (182)
- e2mmap (6)
- erb (24)
-
fiddle
/ import (12) -
irb
/ frame (36) -
irb
/ xmp (12) - resolv-replace (12)
-
rubygems
/ installer (36) -
rubygems
/ specification (36) - socket (120)
- tracer (12)
- un (12)
クラス
- Addrinfo (24)
- Binding (86)
- ERB (24)
-
Gem
:: Installer (36) -
Gem
:: Specification (36) - IPSocket (12)
-
IRB
:: Frame (36) - Method (36)
- Module (12)
- Proc (12)
- Socket (36)
-
Socket
:: AncillaryData (12) - TracePoint (12)
- Tracer (12)
- UDPSocket (48)
- UnboundMethod (24)
モジュール
- Exception2MessageMapper (6)
-
Fiddle
:: Importer (12) - Kernel (24)
キーワード
- === (6)
- [] (6)
- accept (12)
-
add
_ bindir (12) -
bind
_ call (12) - binding (24)
- bindir (12)
- bindir= (12)
- bottom (12)
- call (12)
- connect (12)
- eval (12)
-
generate
_ bin _ script (12) -
generate
_ bin _ symlink (12) -
generate
_ windows _ script (12) - httpd (12)
-
instance
_ method (12) - irb (9)
-
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (11) - receiver (11)
- recvfrom (24)
-
recvfrom
_ nonblock (12) - result (12)
- run (12)
-
source
_ location (7) - top (12)
-
trace
_ func (24) - unbind (12)
- xmp (12)
検索結果
先頭5件
-
Binding
# irb -> object (3001.0) -
REPLのセッションを開始します。
...REPLのセッションを開始します。
2.5.0 からは require 'irb' せずに直接 binding.irb を呼び出しても使えるようになりました。
@see irb... -
Binding
# local _ variable _ defined?(symbol) -> bool (3001.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
...a = 1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # => false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("defined?(#{symbol}) == 'local-variable'")
//}
@see Binding#local_variable_get, Binding#loc... -
Binding
# local _ variable _ get(symbol) -> object (3001.0) -
引数 symbol で指定した名前のローカル変数に設定された値を返します。
...例][ruby]{
def foo
a = 1
binding.local_variable_get(:a) # => 1
binding.local_variable_get(:b) # => NameError
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("#{symbol}")
//}
@see Binding#local_variable_set, Binding#local_variable_defined?... -
Binding
# local _ variables -> [Symbol] (3001.0) -
ローカル変数の一覧を Symbol の配列で返します。
...カル変数の一覧を Symbol の配列で返します。
//emlist[例][ruby]{
def foo
a = 1
2.times do |n|
binding.local_variables #=> [:a, :n]
end
end
//}
このメソッドは以下のコードと同様の動作をします。
//emlist[][ruby]{
binding.eval("local_variables")
//}... -
Binding
# receiver -> object (3001.0) -
保持するコンテキスト内での self を返します。
...保持するコンテキスト内での self を返します。
このメソッドは以下のコードと同様の動作をします。
//emlist[][ruby]{
binding.eval("self")
//}... -
Binding
# source _ location -> [String , Integer] (3001.0) -
self の Ruby のソースファイル名と行番号を返します。
...self の Ruby のソースファイル名と行番号を返します。
d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。
//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}... -
IRB
:: Frame # trace _ func(event , file , line , id , binding) -> Binding (201.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
Kernel
# xmp(exps , bind = nil) -> XMP (108.0) -
引数 exps で指定されたRuby のソースコードとその実行結果を、標準出力に行 ごとに交互に表示します。
...定します。
@param bind Binding オブジェクトを指定します。省略した場合は、最
後に実行した XMP#puts、Kernel#xmp の
Binding を使用します。まだ何も実行していない場合は
Object::TOPLEVEL_BINDING を使用します... -
ERB
# result(b=TOPLEVEL _ BINDING) -> String (101.0) -
ERB を b の binding で実行し、結果の文字列を返します。
...ERB を b の binding で実行し、結果の文字列を返します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
puts erb.result
# test foo
# test bar
//... -
ERB
# run(b=TOPLEVEL _ BINDING) -> nil (101.0) -
ERB を b の binding で実行し、結果を標準出力へ印字します。
...ERB を b の binding で実行し、結果を標準出力へ印字します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
erb.run
# test foo
# test bar
//}...