Skip to content

Instantly share code, notes, and snippets.

@PeteMichaud
Created June 8, 2012 23:34
Show Gist options
  • Save PeteMichaud/2898686 to your computer and use it in GitHub Desktop.
Save PeteMichaud/2898686 to your computer and use it in GitHub Desktop.
module ParserModule
data = nil
pages = nil
def data=d
data = d
end
def data
data
end
def pages
if pages.nil?
pages = data.split /^\d{4}\s*$/
end
pages
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment