๐ File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 06:01:37
๐
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
CSV
๐ /opt/alt/ruby33/share/ri/system/CSV
๐ Refresh
โ๏ธ
Editing: instance-c.ri
Read Only
U:RDoc::AnyMethod[iI" instance:ETI"CSV::instance;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"/Creates or retrieves cached \CSV objects. ;TI",For arguments and options, see CSV.new.;To:RDoc::Markup::BlankLine o; ; [I"!This API is not Ractor-safe.;T@S:RDoc::Markup::Rule:weighti@o; ; [I"0With no block given, returns a \CSV object.;T@o; ; [I"CThe first call to +instance+ creates and caches a \CSV object:;To:RDoc::Markup::Verbatim; [I"s0 = 's0' ;TI"csv0 = CSV.instance(s0) ;TI"csv0.class # => CSV ;T:@format0o; ; [I"FSubsequent calls to +instance+ with that _same_ +string+ or +io+ ;TI"&retrieve that same cached object:;To;; [I"csv1 = CSV.instance(s0) ;TI"csv1.class # => CSV ;TI"3csv1.equal?(csv0) # => true # Same CSV object ;T;0o; ; [I"IA subsequent call to +instance+ with a _different_ +string+ or +io+ ;TI"2creates and caches a _different_ \CSV object.;To;; [I"s1 = 's1' ;TI"csv2 = CSV.instance(s1) ;TI"9csv2.equal?(csv0) # => false # Different CSV object ;T;0o; ; [I".All the cached objects remains available:;To;; [ I"csv3 = CSV.instance(s0) ;TI"0csv3.equal?(csv0) # true # Same CSV object ;TI"csv4 = CSV.instance(s1) ;TI"0csv4.equal?(csv2) # true # Same CSV object ;T;0S;; i@o; ; [I"JWhen a block is given, calls the block with the created or retrieved ;TI"3\CSV object; returns the block's return value:;To;; [I"-CSV.instance(s0) {|csv| :foo } # => :foo;T;0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"๏ฟฝinstance(string, **options) instance(io = $stdout, **options) instance(string, **options) {|csv| ... } instance(io = $stdout, **options) {|csv| ... } ;TI" instance;T[ I" (data = $stdout, **options);T@BFI"CSV;TcRDoc::NormalClass00
๐พ Save Changes
โ Cancel