lib/fat_table/table.rb in fat_table-0.6.0 vs lib/fat_table/table.rb in fat_table-0.6.1

- old
+ new

@@ -528,11 +528,16 @@ # :category: Attributes # Yield each row of the table as a Hash with the column symbols as keys. def each - rows.each do |row| - yield row + if block_given? + rows.each do |row| + yield row + end + self + else + to_enum(:each) end end # :category: Attributes