るりまサーチ

最速Rubyリファレンスマニュアル検索!
581件ヒット [1-100件を表示] (0.045秒)
トップページ > クエリ:nil[x] > クエリ:end[x] > クエリ:path[x]

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. _builtin nil
  5. object nil

検索結果

<< 1 2 3 ... > >>

LoadError#path -> String | nil (18220.0)

Kernel.#require や Kernel.#load に失敗したパスを返します。

...Kernel.#require や Kernel.#load に失敗したパスを返します。

begin
require 'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end


パスが定まらない場合は nil を返します。...

Pathname#ascend {|pathname| ... } -> nil (9361.0)

self のパス名から親方向に辿っていったときの各パス名を新しい Pathname オ ブジェクトとして生成し、ブロックへの引数として渡して実行します。 ブロックを省略した場合は Enumerator を返します。

... Pathname オ
ブジェクトとして生成し、ブロックへの引数として渡して実行します。
ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require 'pathname'

Path
name.new('/path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:/path/to/...
...ome/file.rb>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to>
# #<Pathname:/path>
# #<Pathname:/>

Path
name.new('path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:path/to/some/file.rb>
# #<Pathname:path/to/some>
# #<Pathname:path/to>
# #<Pathname:path>
//}

ファイル...

Pathname#descend {|pathname| ... } -> nil (9361.0)

self のパス名の親から子供へと辿っていったときの各パス名を新しい Pathname オブジェクトとして生成し、ブロックへの引数として渡して実行しま す。 ブロックを省略した場合は Enumerator を返します。

...しい
Path
name オブジェクトとして生成し、ブロックへの引数として渡して実行しま
す。
ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require 'pathname'

Path
name.new('/path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:/>...
...# #<Pathname:/path>
# #<Pathname:/path/to>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to/some/file.rb>

Path
name.new('path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:path>
# #<Pathname:path/to>
# #<Pathname:path/to/some>
# #<Pathname:path/to/some/file.rb>
//}

...

Pathname#opendir {|dir| ... } -> nil (9201.0)

Dir.open(self.to_s, &block) と同じです。

Dir.open(self.to_s, &block) と同じです。


@see Dir.open

Pathname#ascend -> Enumerator (9161.0)

self のパス名から親方向に辿っていったときの各パス名を新しい Pathname オ ブジェクトとして生成し、ブロックへの引数として渡して実行します。 ブロックを省略した場合は Enumerator を返します。

... Pathname オ
ブジェクトとして生成し、ブロックへの引数として渡して実行します。
ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require 'pathname'

Path
name.new('/path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:/path/to/...
...ome/file.rb>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to>
# #<Pathname:/path>
# #<Pathname:/>

Path
name.new('path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:path/to/some/file.rb>
# #<Pathname:path/to/some>
# #<Pathname:path/to>
# #<Pathname:path>
//}

ファイル...

絞り込み条件を変える

Pathname#descend -> Enumerator (9161.0)

self のパス名の親から子供へと辿っていったときの各パス名を新しい Pathname オブジェクトとして生成し、ブロックへの引数として渡して実行しま す。 ブロックを省略した場合は Enumerator を返します。

...しい
Path
name オブジェクトとして生成し、ブロックへの引数として渡して実行しま
す。
ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require 'pathname'

Path
name.new('/path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:/>...
...# #<Pathname:/path>
# #<Pathname:/path/to>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to/some/file.rb>

Path
name.new('path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:path>
# #<Pathname:path/to>
# #<Pathname:path/to/some>
# #<Pathname:path/to/some/file.rb>
//}

...

Pathname#opendir -> Dir (9101.0)

Dir.open(self.to_s, &block) と同じです。

Dir.open(self.to_s, &block) と同じです。


@see Dir.open

Net::HTTP#send_request(name, path, data = nil, header = nil) -> Net::HTTPResponse (6409.0)

HTTP リクエストをサーバに送り、そのレスポンスを Net::HTTPResponse のインスタンスとして返します。

...で与えます。
@param path リクエストのパスを文字列で与えます。
@param data リクエストのボディを文字列で与えます。
@param header リクエストのヘッダをハッシュで与えます。

//emlist[例][ruby]{
response = http.send_request('GET', '/index.htm...

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

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

...f を文字列から作成していた場合は nil を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil

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

# /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...

Rake::FileList#pathmap(spec = nil) -> Rake::FileList (6207.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...

絞り込み条件を変える

<< 1 2 3 ... > >>