Module: RbFind::Csv
- Included in:
- Entry
- Defined in:
- lib/rbfind/csv.rb
Constant Summary collapse
- COLON =
Windows has “:” in filenames (“C:...”)
File::ALT_SEPARATOR ? "|" : ":"
Class Method Summary collapse
Instance Method Summary collapse
-
#colsep(*args) ⇒ Object
(also: #col_sep)
:nodoc:.
- #csv(sep, *args) ⇒ Object
- #spcsep(*args) ⇒ Object (also: #spc_sep, #spacesep, #p)
- #tabsep(*args) ⇒ Object (also: #tab_sep)
Class Method Details
.outfile(out) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/rbfind/csv.rb', line 43 def outfile out o, @outfile = @outfile, out yield ensure @outfile = o end |
.putl(l) ⇒ Object
40 41 42 |
# File 'lib/rbfind/csv.rb', line 40 def putl l @outfile << l << $/ end |
Instance Method Details
#colsep(*args) ⇒ Object Also known as: col_sep
:nodoc:
13 14 15 |
# File 'lib/rbfind/csv.rb', line 13 def colsep *args csv COLON, *args end |
#csv(sep, *args) ⇒ Object
31 32 33 34 |
# File 'lib/rbfind/csv.rb', line 31 def csv sep, *args e = args.join sep Csv.putl e end |
#spcsep(*args) ⇒ Object Also known as: spc_sep, spacesep, p
23 24 25 |
# File 'lib/rbfind/csv.rb', line 23 def spcsep *args csv " ", *args end |
#tabsep(*args) ⇒ Object Also known as: tab_sep
18 19 20 |
# File 'lib/rbfind/csv.rb', line 18 def tabsep *args csv "\t", *args end |