Permalink
Browse files

Shrink down a bit.

  • Loading branch information...
lukaso committed Aug 19, 2012
1 parent c9be397 commit dd1113cac86c5140e0b177cd7dd99650266d9b94
Showing with 1 addition and 5 deletions.
  1. +1 −5 lib/turnip/builder.rb
View
@@ -98,11 +98,7 @@ def substitute(text, headers, row)
def substitute_extra_args(step, headers, row)
return step.extra_args unless index = step.extra_args.find_index { |a| a.instance_of?(Turnip::Table) }
step.extra_args.dup.tap do |ea|
- ea[index] = ea[index].dup.tap do |t|
- t.raw.each_index do |i|
- t.raw[i].each_index { |j| t.raw[i][j] = substitute(t.raw[i][j], headers, row) }
- end
- end
+ ea[index] = ea[index].dup.tap {|t| t.raw.map! {|t_row| t_row.map! {|t_col| substitute(t_col, headers, row) } } }
end
end
end

0 comments on commit dd1113c

Please sign in to comment.