414件ヒット
[101-200件を表示]
(0.156秒)
別のキーワード
ライブラリ
- ビルトイン (210)
-
json
/ add / exception (12) - logger (12)
-
net
/ http (36) - optparse (12)
- pathname (48)
- rake (24)
-
rake
/ packagetask (12) -
rexml
/ document (24) -
rubygems
/ gem _ path _ searcher (12) - win32ole (12)
クラス
-
ARGF
. class (24) - Dir (24)
- Exception (24)
- File (24)
-
Gem
:: GemPathSearcher (12) - IO (6)
- Logger (12)
-
Net
:: HTTPGenericRequest (12) -
Net
:: HTTPResponse (24) - OptionParser (12)
- Pathname (48)
- Proc (12)
-
REXML
:: Element (24) -
Rake
:: Application (12) -
Rake
:: FileList (12) -
Rake
:: PackageTask (12) -
RubyVM
:: InstructionSequence (36) -
Thread
:: Backtrace :: Location (48) - TracePoint (24)
-
WIN32OLE
_ TYPELIB (12)
キーワード
-
absolute
_ path (24) - binread (12)
- filename (12)
- formatter (12)
- inspect (36)
-
lib
_ dirs _ for (12) -
original
_ dir (12) -
package
_ dir _ path (12) - pathmap (12)
-
program
_ name (12) -
read
_ body (24) -
set
_ backtrace (12) -
source
_ location (12) - sub (24)
- text (12)
-
to
_ json (12) -
to
_ path (27) -
to
_ s (24) - xpath (12)
検索結果
先頭5件
-
ARGF
. class # path -> String (18316.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... -
Thread
:: Backtrace :: Location # absolute _ path -> String (15345.0) -
self が表すフレームの絶対パスを返します。
...list[例][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... -
IO
# to _ path -> String | nil (12341.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"
//}... -
File
# to _ path -> String (12335.0) -
オープン時に使用したパスを文字列で返します。
...stants::TMPFILEオプション付きで作成されていたりする場合です。
//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::T......MPFILE){|f| f.path } #=> "/tmp"
//}......or TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。
//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
# to _ path -> String (12329.0) -
オープンしているディレクトリのパス名を文字列で返します。
...オープンしているディレクトリのパス名を文字列で返します。
//emlist[例][ruby]{
Dir.open("..") do |d|
d.path # => ".."
d.to_path # => ".."
end
//}... -
Rake
:: PackageTask # package _ dir _ path -> String (12321.0) -
パッケージに含むファイルを配置するディレクトリを返します。
...パッケージに含むファイルを配置するディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir_path # => "pkg/sample-1.0.0"
end
//}... -
REXML
:: Element # xpath -> String (12314.0) -
文書上の対象の要素にのみマッチする xpath 文字列を返します。
...する xpath 文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/><c/></a>')
c = doc.root.elements[2] # <a> .. </a> の中の <c/> 要素
c # => <c/>
c.xpath # => "/a/c"
doc = REXML::Document.new('<a><b/><b/></a>')
b = doc.root.elements[2] # <a> ........ </a> の中の2番目の <b/> 要素
b # => <b/>
b.xpath # => "/a/b[2]"
//}... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (12235.0) -
各要素に String#pathmap を適用した新しい Rake::FileList を返します。
... String#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", "tes......t3"]
end
//}
@see String#pathmap... -
RubyVM
:: InstructionSequence # inspect -> String (12220.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
Pathname
# to _ s -> String (9226.0) -
パス名を文字列で返します。
...パス名を文字列で返します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/hogehoge")
File.open(path)
//}...