1473件ヒット
[1-100件を表示]
(0.096秒)
別のキーワード
ライブラリ
- ビルトイン (342)
- etc (12)
-
irb
/ cmd / load (24) -
json
/ add / exception (12) - logger (12)
- mkmf (12)
-
net
/ http (276) - optparse (24)
- pathname (555)
- rake (48)
-
rake
/ packagetask (12) -
rexml
/ document (72) - rubygems (12)
-
rubygems
/ custom _ require (12) -
rubygems
/ gem _ path _ searcher (12) - socket (24)
- win32ole (12)
クラス
-
ARGF
. class (24) - Addrinfo (24)
- Dir (24)
-
Encoding
:: Converter (12) - Exception (24)
- File (24)
-
File
:: Stat (24) -
Gem
:: GemPathSearcher (12) - IO (78)
-
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Source (12) - Logger (12)
-
Net
:: HTTP (216) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (24) - OptionParser (24)
- Pathname (555)
- Proc (12)
-
REXML
:: Element (36) -
REXML
:: Elements (36) -
Rake
:: Application (12) -
Rake
:: DefaultLoader (12) -
Rake
:: FileList (12) -
Rake
:: PackageTask (12) -
RubyVM
:: InstructionSequence (48) - Thread (24)
-
Thread
:: Backtrace :: Location (48) - TracePoint (24)
-
WIN32OLE
_ TYPELIB (12)
モジュール
- Kernel (36)
-
Rake
:: TaskManager (12)
キーワード
- + (12)
-
/ (11) - <=> (24)
- == (12)
- === (12)
- absolute? (12)
-
absolute
_ path (24) - ascend (24)
- atime (12)
-
backtrace
_ locations (24) - basename (12)
- binread (12)
-
body
_ stream (12) -
body
_ stream= (12) - children (12)
- chown (12)
- cleanpath (12)
- convpath (12)
-
create
_ makefile (12) -
create
_ rule (12) - ctime (12)
- delete (12)
-
delete
_ all (12) - descend (24)
- dirname (12)
- each (12)
-
each
_ child (24) -
each
_ entry (15) -
each
_ filename (12) -
each
_ line (24) - empty? (9)
- entries (12)
- eql? (12)
- execute (24)
-
family
_ addrinfo (24) - fdatasync (12)
- filename (12)
- flush (12)
- fnmatch (12)
- formatter (12)
- gem (12)
- get (24)
- get2 (24)
-
get
_ text (12) - glob (16)
- head (12)
- head2 (24)
- inspect (36)
- join (12)
-
lib
_ dirs _ for (12) - load (12)
- mountpoint? (12)
-
original
_ dir (12) -
package
_ dir _ path (12) - parent (12)
- pathconf (12)
- pathmap (12)
- post (24)
- post2 (24)
-
program
_ name (12) -
program
_ name= (12) -
read
_ body (24) - realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) - reopen (36)
-
request
_ get (24) -
request
_ head (24) -
request
_ post (24) - require (12)
- root? (12)
-
send
_ request (12) -
set
_ backtrace (12) - size? (12)
-
source
_ location (12) - split (12)
- sub (24)
-
sub
_ ext (12) - text (12)
-
to
_ a (24) -
to
_ json (12) -
to
_ path (27) -
to
_ s (24) - unlink (12)
- xpath (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # path -> String (21120.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... -
IO
# path -> String | nil (18133.0) -
IO に関連付けられたパスを返します。IO がパスに関連付けられていない場合は nil を返します。
...が返すパスがファイルシステム上に存在することは保証されていません。
//emlist[例][ruby]{
p STDIN.path # => "<STDIN>"
p IO.new(IO.sysopen("/")).path # => "/"
p IO.new(IO.sysopen("/"), path: "foo").path # => "foo"
//}... -
Net
:: HTTPGenericRequest # path -> String (18130.0) -
リクエストする path を文字列で返します。
...リクエストする path を文字列で返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.path # => "/index.html"
//}... -
File
# path -> String (18127.0) -
オープン時に使用したパスを文字列で返します。
...作成されていたりする場合です。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } #=> "/tmp"
//}......合に発生します。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
/... -
Dir
# path -> String (18121.0) -
オープンしているディレクトリのパス名を文字列で返します。
...オープンしているディレクトリのパス名を文字列で返します。
//emlist[例][ruby]{
Dir.open("..") do |d|
d.path # => ".."
d.to_path # => ".."
end
//}... -
Thread
:: Backtrace :: Location # path -> String (18120.0) -
self が表すフレームのファイル名を返します。
...self が表すフレームのファイル名を返します。
例: Thread::Backtrace::Location の例1を用いた例
//emlist[][ruby]{
loc = c(0..1).first
loc.path # => "caller_locations.rb"
//}
@see Thread::Backtrace::Location#absolute_path... -
TracePoint
# path -> String (18120.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
//}... -
WIN32OLE
_ TYPELIB # path -> String (18114.0) -
TypeLibのパス名を取得します。
...。
@return TypeLibのパス名を文字列で返します。この値はレジストリの登録値を
そのまま利用するため、Rubyのパス名形式(ディレクトリ区切りは
「/」)ではなく、Windowsのパス名形式(ディレクトリ区切りは「\」......ypeLibの属性が読み取れない場合に通知します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.path # => 'C:\...\EXCEL.EXE'
TypeLibは拡張子TLB(まれにOLB)という独立したファイルの場合と、サーバの
DLLやEXE内にリソ... -
ARGF
. class # path -> String (15108.0) -
現在開いている処理対象のファイル名を返します。
...ては - を返します。
組み込み変数 $FILENAME と同じです。
$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark
$ ruby argf.rb foo bar glark
ARGF.filename # => "foo"
ARGF.read(5) # => "foo\nb"
ARGF.filename # => "bar"
ARGF.skip
ARGF.filename # => "glark... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (9278.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path...