るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

キーワード

検索結果

Rake::FileList#existing -> Rake::FileList (18113.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"]...

Rake::FileList#existing! -> self (6113.0)

自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含むように自身を変更して返します。

...て返します。

//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"]...

ruby 1.8.4 feature (4493.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ruby 1.8.4 feature
ruby
1.8.4 での ruby 1.8.3 からの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。...
...以下は各変更点に付けるべきタグです。

記号について(特に重要なものは大文字(主観))

# * カテゴリ
# * [ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]:...
...>ruby -v -Ku a.rb -n 時間
ruby
1.8.4 (2005-12-16) [i686-linux]
[-n, 時間]
時間

: find

#Tue Nov 15 23:46:35 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * lib/find.rb (Find::find): should not ignore symbolic links to
# non-existing files. [ruby-t...

CSV (72.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"]

# ファイル...
...)
# => [["Ruby", "1995"], ["Rust", "2010"]]

# 文字列から一行ずつ
CSV.parse(csv_text) do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# 文字列から一度に
p CSV.parse(csv_text)
# => [["Ruby", "1995"], ["Rust", "2010"]]
//}

=== 書き込み

//emlist[][ruby]{
require...
...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...

Binding#local_variable_set(symbol, obj) (24.0)

引数 symbol で指定した名前のローカル変数に引数 obj を設定します。

...bol で指定したローカル変数に設定するオブジェクトを指定します。

//emlist[例][ruby]{
def foo
a = 1
bind = binding
bind.local_variable_set(:a, 2) # set existing local variable `a'
bind.local_variable_set(:b, 3) # create new local variable `b'...
...# => NameError
end
//}

このメソッドは以下のコード(ただし、obj が Ruby のコードで出力される場
合)と同様の動作をします。

//emlist[][ruby]{
binding.eval("#{symbol} = #{obj}")
//}

@see Binding#local_variable_get, Binding#local_variable_defi...

絞り込み条件を変える