るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Rake::FileList#to_s -> String (24232.0)

全ての要素をスペースで連結した文字列を返します。

...全ての要素をスペースで連結した文字列を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
file
_list = FileList['a.c', 'b.c']
file
_list.to_s # => "a.c b.c"
end
//}...

Pathname#to_s -> String (18220.0)

パス名を文字列で返します。

...パス名を文字列で返します。


//emlist[例][ruby]{
r
equire 'pathname'

path = Pathname.new("/tmp/hogehoge")
File
.open(path)
//}...

IO#syswrite(string) -> Integer (6241.0)

write(2) を用いて string を出力します。 string が文字列でなければ to_s による文字列化を試みます。 実際に出力できたバイト数を返します。

...write(2) を用いて string を出力します。
string が文字列でなければ to_s による文字列化を試みます。
実際に出力できたバイト数を返します。

stdio を経由しないので他の出力メソッドと混用すると思わぬ動作
をすることがあり...
...す。

@param string 自身に書き込みたい文字列を指定します。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
File
.open("testfile", "w+") do...
...|f|
f.syswrite("ABCDE") # => 5
f.syswrite(:ABC) # => 3
end
File
.read("testfile") # => "ABCDEABC"
//}...

IO#write(*str) -> Integer (6165.0)

IOポートに対して str を出力します。str が文字列でなけ れば to_s による文字列化を試みます。 実際に出力できたバイト数を返します。

...IOポートに対して str を出力します。str が文字列でなけ
れば to_s による文字列化を試みます。
実際に出力できたバイト数を返します。

IO#syswrite を除く全ての出力メソッドは、最終的に
"write" という名のメソッドを呼び出...
...param str 自身に書き込みたい文字列を指定します。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
File
.open("textfile", "w+") do |f|
f.writ...
...e("This is") # => 7
end
File
.read("textfile") # => "This is"
//}
//emlist[複数引数の例][ruby]{
File
.open("textfile", "w+") do |f|
f.write("This is", " a test\n") # => 15
end
File
.read("textfile") # => "This is a test\n"
//}...

Pathname#dirname -> Pathname (6151.0)

Pathname.new(File.dirname(self.to_s)) と同じです。

...Pathname.new(File.dirname(self.to_s)) と同じです。

//emlist[例][ruby]{
r
equire "pathname"

Pathname('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}

@see File.dirname...

絞り込み条件を変える

IO#write(str) -> Integer (6141.0)

IOポートに対して str を出力します。str が文字列でなけ れば to_s による文字列化を試みます。 実際に出力できたバイト数を返します。

...IOポートに対して str を出力します。str が文字列でなけ
れば to_s による文字列化を試みます。
実際に出力できたバイト数を返します。

IO#syswrite を除く全ての出力メソッドは、最終的に
"write" という名のメソッドを呼び出...
...param str 自身に書き込みたい文字列を指定します。

@raise IOError 自身が書き込み用にオープンされていなければ発生します。

@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
File
.open("textfile", "w+") do |f|
f.writ...
...e("This is") # => 7
end
File
.read("textfile") # => "This is"
//}...

Pathname#fnmatch(pattern, *args) -> bool (163.0)

File.fnmatch(pattern, self.to_s, *args) と同じです。

...File.fnmatch(pattern, self.to_s, *args) と同じです。

@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。

@param args File.fnmatch...
...を参照してください。

//emlist[例][ruby]{
r
equire "pathname"

path = Pathname("testfile")
path.fnmatch("test*") # => true
path.fnmatch("TEST*") # => false
path.fnmatch("TEST*", File::FNM_CASEFOLD) # => true
//}

@see File.fnmatch...

Pathname#chown(owner, group) -> Integer (157.0)

File.chown(owner, group, self.to_s) と同じです。

...File.chown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。

//emlist[例][ruby]{
r
equire 'pathname'

Pathname('testfile').stat.uid # => 501
Pathname('testfile').chown(502, 12)
Pathname('testfile').stat.ui...
...d # => 502
//}

@see File.chown, File#chown...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (151.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]{
r
equire "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...

Pathname#split -> Array (151.0)

File.split(self.to_s) と同じです。

...File.split(self.to_s) と同じです。

//emlist[例][ruby]{
r
equire "pathname"

pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split...

絞り込み条件を変える

<< 1 2 > >>