るりまサーチ

最速Rubyリファレンスマニュアル検索!
396件ヒット [1-100件を表示] (0.057秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

検索結果

<< 1 2 3 ... > >>

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...
<< 1 2 3 ... > >>