Top Level Namespace

Defined Under Namespace

Modules: Chell

Instance Method Summary collapse

Instance Method Details

#Chell(*args, &block) ⇒ Object

An alias method for using Chell

csv = Chell(File.read('example.csv'))
p csv.headers

If a block is given, ‘csv.table` is passed the block.

Chell(File.read('example.csv')) do |csv|
  p csv.headers
end


71
72
73
74
75
76
77
78
# File 'lib/chell.rb', line 71

def Chell(*args, &block)
  table = Chell::CSV.new(*args).table
  if block_given?
    yield table
  else
    table
  end
end