1078件ヒット
[1-100件を表示]
(0.129秒)
別のキーワード
ライブラリ
- ビルトイン (220)
- etc (12)
-
irb
/ cmd / load (24) -
json
/ add / exception (12) - mkmf (12)
-
net
/ http (264) - optparse (24)
- pathname (354)
- rake (36)
-
rexml
/ document (60) - rubygems (12)
-
rubygems
/ custom _ require (12) - socket (24)
- win32ole (12)
クラス
- Addrinfo (24)
-
Encoding
:: Converter (12) - Exception (24)
- File (16)
-
File
:: Stat (12) - IO (48)
-
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Source (12) -
Net
:: HTTP (216) -
Net
:: HTTPGenericRequest (24) -
Net
:: HTTPResponse (24) - OptionParser (24)
- Pathname (354)
- Proc (12)
-
REXML
:: Element (24) -
REXML
:: Elements (36) -
Rake
:: DefaultLoader (12) -
Rake
:: FileList (12) -
RubyVM
:: InstructionSequence (36) - Thread (24)
-
Thread
:: Backtrace :: Location (48) - TracePoint (12)
-
WIN32OLE
_ TYPELIB (12)
モジュール
- Kernel (36)
-
Rake
:: TaskManager (12)
キーワード
- + (12)
-
/ (11) - <=> (24)
- == (12)
- === (12)
-
absolute
_ path (24) -
backtrace
_ locations (24) - binread (12)
-
body
_ stream (12) -
body
_ stream= (12) - children (12)
- chown (12)
- cleanpath (12)
- convpath (12)
-
create
_ makefile (12) -
create
_ rule (12) -
delete
_ all (12) - dirname (12)
- each (12)
-
each
_ child (24) -
each
_ entry (15) -
each
_ line (24) - entries (12)
- eql? (12)
- execute (24)
-
family
_ addrinfo (24) - fnmatch (12)
- gem (12)
- get (24)
- get2 (24)
-
get
_ text (12) - glob (16)
- head (12)
- head2 (24)
- inspect (24)
- join (12)
- load (12)
- pathconf (12)
- pathmap (12)
- post (24)
- post2 (24)
-
program
_ name (12) -
program
_ name= (12) -
read
_ body (24) - realdirpath (12)
- realpath (24)
-
relative
_ path _ from (12) - reopen (36)
-
request
_ get (24) -
request
_ head (24) -
request
_ post (24) - require (12)
-
send
_ request (12) -
set
_ backtrace (12) -
source
_ location (12) - split (12)
- sub (24)
-
sub
_ ext (12) - text (12)
-
to
_ a (12) -
to
_ json (12) -
to
_ path (8) -
to
_ s (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # path -> String (50226.0) -
self が表す命令シーケンスの相対パスを返します。
...irb で実行した場合
iseq = 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, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (38226.0) -
self が表す命令シーケンスの絶対パスを返します。
...irb で実行した場合
iseq = 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, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # inspect -> String (32125.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
Thread
:: Backtrace :: Location # path -> String (21232.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 (21232.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
//}... -
File
# path -> String (18239.0) -
オープン時に使用したパスを文字列で返します。
...る場合です。
@raise IOError 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?)
//}... -
WIN32OLE
_ TYPELIB # path -> String (18232.0) -
TypeLibのパス名を取得します。
...TypeLibのパス名を取得します。
@return TypeLibのパス名を文字列で返します。この値はレジストリの登録値を
そのまま利用するため、Rubyのパス名形式(ディレクトリ区切りは
「/」)ではなく、Windowsのパス名形式(......ディレクトリ区切りは「\」)
です。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.path # => 'C:\...\EXCEL.EXE'
TypeLibは拡張子TLB(まれに... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (15444.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...se_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory......絶対パスなら
base_directory も絶対パスでなければなりません。
@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。
@raise ArgumentError Windows上でドライブが違うなど、base_directory から self への相対パ......スが求められないときに例外が発生します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/foo")
base = Pathname.new("/tmp")
path.relative_path_from(base) # => #<Pathname:foo>
//}... -
Pathname
# realdirpath(basedir = nil) -> Pathname (15355.0) -
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。
...
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require "pathna......me"
path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT
# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path = Pathname("/not_exist_1/not_exist_2")
path.realdirpath # => Errno::ENOENT......//}
@see Pathname#realpath...