66件ヒット
[1-66件を表示]
(0.180秒)
ライブラリ
- ビルトイン (22)
-
irb
/ cmd / load (22) - mkmf (11)
- rake (11)
クラス
- BasicObject (22)
-
IRB
:: ExtendCommand :: Load (11) -
IRB
:: ExtendCommand :: Require (11)
キーワード
- execute (22)
-
find
_ executable (11) -
instance
_ eval (22) - sh (11)
検索結果
先頭5件
-
Kernel
# find _ executable(bin , path = nil) -> String | nil (15101.0) -
パス path から実行ファイル bin を探します。
パス path から実行ファイル bin を探します。
実行ファイルが見つかった場合は、そのフルパスを返します。
実行ファイルが見つからなかった場合は、nilを返します。
このメソッドは Makefile を変更しません。
@param bin 実行ファイルの名前を指定します。
@param path パスを指定します。デフォルトは環境変数 PATH です。
環境変数 PATH が定義されていない場合は /usr/local/bin,
/usr/ucb, /usr/bin, /bin を使います。 -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (6107.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
...ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文... -
IRB
:: ExtendCommand :: Require # execute(file _ name) -> bool (6107.0) -
ファイル file_name を現在の irb インタプリタ上で実行します。
...ファイル file_name を現在の irb インタプリタ上で実行します。
file_name に Ruby スクリプトを指定した場合は、Kernel.#require と異
なり、file_name の内容を irb で一行ずつタイプしたかのように、irb 上で一
行ずつ評価されます。req... -
FileUtils
# sh(*cmd) {|result , status| . . . } (31.0) -
与えられたコマンドを実行します。
... Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end
@see Kernel.#exec,... -
BasicObject
# instance _ eval {|obj| . . . } -> object (19.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
...hod を参照してください。
BasicObject を継承して作ったクラス内で instance_eval する場合はトップレベルの定数や Kernel モジュールに定義されているメソッドは見えません。
これは、トップレベルの定数が Object 以下に作成され......imeError)
//}
//emlist[例][ruby]{
class Bar < BasicObject
def call1
instance_eval("::ENV.class")
end
def call2
instance_eval("ENV.class")
end
end
bar = Bar.new
bar.call1 # => Object
bar.call2 # raise NameError
//}
@see Module#module_eval, Kernel.#eval, BasicObject#instance_exec... -
BasicObject
# instance _ eval(expr , filename = "(eval)" , lineno = 1) -> object (19.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
...hod を参照してください。
BasicObject を継承して作ったクラス内で instance_eval する場合はトップレベルの定数や Kernel モジュールに定義されているメソッドは見えません。
これは、トップレベルの定数が Object 以下に作成され......imeError)
//}
//emlist[例][ruby]{
class Bar < BasicObject
def call1
instance_eval("::ENV.class")
end
def call2
instance_eval("ENV.class")
end
end
bar = Bar.new
bar.call1 # => Object
bar.call2 # raise NameError
//}
@see Module#module_eval, Kernel.#eval, BasicObject#instance_exec...