Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…b2e8eb0-7117-0410-aac4-c024b40ed5f7
  • Loading branch information
dinko committed Dec 24, 2006
1 parent c0507ef commit 0290d2f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/ruport/data/table.rb
Expand Up @@ -467,22 +467,14 @@ module Kernel
# t = Table("bar.csv", :has_names => false)
def Table(*args,&block)
table=
if args.length == 1
case(args[0])
case(args[0])
when Array
[].to_table(args[0])
when /\.csv/
Ruport::Data::Table.load(args[0])
else
# for Table("a")
[].to_table([args[0]])
end
else
if args[0] =~ /\.csv/
Ruport::Data::Table.load(*args)
else
# for Table("a")
[].to_table(args)
end
end

block[table] if block
Expand Down

0 comments on commit 0290d2f

Please sign in to comment.