33件ヒット
[1-33件を表示]
(0.021秒)
種類
- インスタンスメソッド (22)
- クラス (11)
クラス
-
Rake
:: FileList (22)
検索結果
-
Rake
:: FileList # existing -> Rake :: FileList (18119.0) -
自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含む Rake::FileList を返します。
...ます。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.existing # => ["test1.rb", "test2.rb"]
end
//}... -
Rake
:: FileList # existing! -> self (6119.0) -
自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含むように自身を変更して返します。
...mlist[][ruby]{
# Rakefile での記載例とする
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.existing! # => ["test1.rb", "test2.rb"]
file_list... -
CSV (12.0)
-
このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。
...フェイスを提供します。
=== 読み込み
//emlist[][ruby]{
require "csv"
csv_text = <<~CSV_TEXT
Ruby,1995
Rust,2010
CSV_TEXT
IO.write "sample.csv", csv_text
# ファイルから一行ずつ
CSV.foreach("sample.csv") do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]......u to specify the Encoding.
One minor exception comes when generating CSV into a String with an Encoding
that is not ASCII compatible. There's no existing data for CSV to use to
prepare itself and thus you will probably need to manually specify the desired
Encoding for most of those cases. It will...