Specify starting point of foreach enumerator in ruby -


i have rake file pulls in data external csv file , enumerates through with:

csv.foreach(file, :headers => true) |row| 

what effective way (in ruby) specify starting point within spreadsheet?

:headers => true allows me start importing second line, if want start line 20?

use .drop(#rows ignore):

csv.open(file, :headers => true).drop(20).each |row|


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -