396件ヒット
[1-100件を表示]
(0.057秒)
別のキーワード
ライブラリ
- ビルトイン (108)
-
irb
/ cmd / load (24) -
json
/ add / exception (12) -
net
/ http (204) - optparse (24)
- rake (24)
クラス
- Exception (24)
- IO (24)
-
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Source (12) -
Net
:: HTTP (156) -
Net
:: HTTPGenericRequest (24) -
Net
:: HTTPResponse (24) - OptionParser (24)
-
Rake
:: FileList (12) -
RubyVM
:: InstructionSequence (24) -
Thread
:: Backtrace :: Location (36) - TracePoint (12)
モジュール
-
Rake
:: TaskManager (12)
キーワード
-
absolute
_ path (24) -
body
_ stream (12) -
body
_ stream= (12) -
create
_ rule (12) - execute (24)
- fdatasync (12)
- flush (12)
- get (24)
- get2 (24)
- inspect (12)
- pathmap (12)
- post (24)
- post2 (24)
-
program
_ name (12) -
program
_ name= (12) -
read
_ body (24) -
request
_ get (24) -
request
_ post (24) -
send
_ request (12) -
set
_ backtrace (12) -
to
_ json (12) -
to
_ s (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # path -> String (21132.0) -
self が表す命令シーケンスの相対パスを返します。
...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = Ruby......VM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
TracePoint
# path -> String (18138.0) -
イベントが発生したファイルのパスを返します。
...トが発生したファイルのパスを返します。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.path # => "/path/to/test.rb"
end
trace.enable
foo 1
//}... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (9132.0) -
self が表す命令シーケンスの絶対パスを返します。
...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = Ruby......VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
Net
:: HTTP # send _ request(name , path , data = nil , header = nil) -> Net :: HTTPResponse (6244.0) -
HTTP リクエストをサーバに送り、そのレスポンスを Net::HTTPResponse のインスタンスとして返します。
...インスタンスとして返します。
@param name リクエストのメソッド名を文字列で与えます。
@param path リクエストのパスを文字列で与えます。
@param data リクエストのボディを文字列で与えます。
@param header リクエストのヘッダ......をハッシュで与えます。
//emlist[例][ruby]{
response = http.send_request('GET', '/index.html')
puts response.body
//}
@see Net::HTTP#request... -
Thread
:: Backtrace :: Location # absolute _ path -> String (6168.0) -
self が表すフレームの絶対パスを返します。
...][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.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (6119.0) -
各要素に String#pathmap を適用した新しい Rake::FileList を返します。
...pathmap を適用した新しい Rake::FileList を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.pathmap("%n") # => ["test1", "test2", "test3"]
end......//}
@see String#pathmap... -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (3057.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
...ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文......字列で指定します。
@param priv 真を指定した場合は実行は内部的に生成される無名モジュール上
で行われ、グローバルな名前空間を汚染しません。
@raise LoadError 読み込みに失敗した場合に発生します。... -
IRB
:: ExtendCommand :: Source # execute(file _ name) -> nil (3045.0) -
現在の irb インタプリタ上で、 Ruby スクリプト path を評価します。
...irb インタプリタ上で、 Ruby スクリプト path を評価します。
path の内容を irb で一行ずつタイプしたかのように、irb 上で一行ずつ評価
されます。$" は更新されず、何度でも実行し直す事ができます。
@param file_name ファイル... -
Net
:: HTTP # post(path , data , header = nil , dest = nil) -> Net :: HTTPResponse (179.0) -
サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。
...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。
ブロックと一緒に呼びだされたときはエンティティボディを少しずつ文字列として
ブロックに与え......つ取得して順次
「dest << ボディの断片」を実行します。
@param path POST先のパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。
1.1 互換モードの場合......, そのボディ] となります。
//emlist[例][ruby]{
# net/http version 1.1
response, body = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# version 1.2
response = http.post('/cgi-bin/search.rb', 'query=subject&target=ruby')
# using block
File.open('save.html', 'w') {|f|
ht...