Skip to content

Instantly share code, notes, and snippets.

@jbowles
Created September 6, 2012 16:27
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 jbowles/3658170 to your computer and use it in GitHub Desktop.
Save jbowles/3658170 to your computer and use it in GitHub Desktop.
New app server with a class for leartoprogram course at One on One
require File.join(File.dirname(__FILE__), 'lib','new_class.rb')
nc = NewClass
tell_me = NewClass.tell_me_something
rs = nc.randomize_select
app = Proc.new do |env|
response = []
response << 200
response << { 'Content-Type' => 'text/plain'}
response << ["Here is our class: #{nc}.\n Here is our method call from the class: #{tell_me}.\n And check this out: #{rs}"]
end
run app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment