Sha256: 27feeee651cffea120d86b3403bfed42455f36a0c6cfac13e45054ab5b903b49

Contents?: true

Size: 569 Bytes

Versions: 2

Compression:

Stored size: 569 Bytes

Contents

#!/usr/local/bin/ruby -w

# shortcut_interface.rb
#
#  Created by James Edward Gray II on 2006-04-01.
#  Copyright 2012 Gray Productions. All rights reserved.
# 
# Feature implementation and example code by Ara.T.Howard.

require "faster_csv"

#
# So now it's this easy to write to STDOUT.
#
FCSV { |f| f << %w( a b c) << %w( d e f ) }

#
# Writing to a String.
#
FCSV(csv = '') do |f|
  f << %w( q r s )
  f << %w( x y z )
end
puts csv

#
# Writing to STDERR.
#
FCSV(STDERR) do |f|
  f << %w( 0 1 2 )
  f << %w( A B C )
end
# >> a,b,c
# >> d,e,f
# >> q,r,s
# >> x,y,z

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/fastercsv-1.5.5/examples/shortcut_interface.rb
fastercsv-1.5.5 examples/shortcut_interface.rb