Skip to content

Instantly share code, notes, and snippets.

@evansmith
Created May 15, 2014 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evansmith/ceb1e977363ce7256fca to your computer and use it in GitHub Desktop.
Save evansmith/ceb1e977363ce7256fca to your computer and use it in GitHub Desktop.
cake list
require 'sinatra'
require 'sinatra/reloader' if development?
require 'erb'
get '/' do
line_num = 0
#@cake = []
cake = File.open("cake.list").readlines.each do |line|
#@cake.push("#{line_num +=1}. #{line}")
"#{line_num +=1}. #{line}"
end
#erb :index
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment