るりまサーチ

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

別のキーワード

  1. _builtin puts
  2. csv puts
  3. stringio puts
  4. zlib puts
  5. xmp puts

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

RubyVM::InstructionSequence#path -> String (18126.0)

self が表す命令シーケンスの相対パスを返します。

...ompiled>@<compiled>>
iseq.path
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts
"hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@see Ruby...
...VM::InstructionSequence#absolute_path...

WIN32OLE_TYPELIB#path -> String (18114.0)

TypeLibのパス名を取得します。

...Error TypeLibの属性が読み取れない場合に通知します。

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts
tlib.path # => 'C:\...\EXCEL.EXE'

TypeLibは拡張子TLB(まれにOLB)という独立したファイルの場合と、サーバの
DLLやEXE内...

Thread::Backtrace::Location#absolute_path -> String (6138.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...

RubyVM::InstructionSequence#absolute_path -> String | nil (6126.0)

self が表す命令シーケンスの絶対パスを返します。

...ompiled>>
iseq.absolute_path
# => nil

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts
"hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@...
...see RubyVM::InstructionSequence#path...

Shell#foreach(path = nil, &block) -> () (146.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...
path
がファイルなら, File#foreach
path
がディレクトリなら, Dir#foreach
の動作をします。

@param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){...
...|f|
puts
f
}...

絞り込み条件を変える

Shell::CommandProcessor#foreach(path = nil, &block) -> () (146.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...
path
がファイルなら, File#foreach
path
がディレクトリなら, Dir#foreach
の動作をします。

@param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){...
...|f|
puts
f
}...

Shell::Filter#foreach(path = nil, &block) -> () (146.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...
path
がファイルなら, File#foreach
path
がディレクトリなら, Dir#foreach
の動作をします。

@param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){...
...|f|
puts
f
}...

Net::HTTP#get2(path, header = nil) -> Net::HTTPResponse (133.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という...
...す。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts
response.body...

Net::HTTP#get2(path, header = nil) {|response| .... } -> Net::HTTPResponse (133.0)

サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。

...サーバ上の path にあるエンティティを取得します。
Net::HTTPResponse オブジェクトを返します。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*', ... } という...
...す。

@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。

//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts
response.body...

Net::HTTP#post2(path, data, header = nil) -> Net::HTTPResponse (133.0)

サーバ上の path にあるエンティティに対し文字列 data を POST で送ります。 返り値は Net::HTTPResponse のインスタンスです。

...サーバ上の path にあるエンティティに対し文字列 data を
POST で送ります。
返り値は Net::HTTPResponse のインスタンスです。

header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { '...
...ます。
もし header に指定しなかったならば、 Content-Type として
"application/x-www-form-urlencoded" を用います。

@param path POST先のエンティティのパスを文字列で指定します。
@param data POSTするデータを与えます。
@param header リクエス...
...なので使わないでください。

//emlist[例][ruby]{
response = http.request_post('/cgi-bin/nice.rb', 'datadatadata...')
p response.status
puts
response.body # body is already read

# using block
http.request_post('/cgi-bin/nice.rb', 'datadatadata...') {|response|
p response.stat...

絞り込み条件を変える

<< 1 2 3 > >>