Skip to content

Instantly share code, notes, and snippets.

@andreiglingeanu
Last active December 21, 2015 11:08
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 andreiglingeanu/6296616 to your computer and use it in GitHub Desktop.
Save andreiglingeanu/6296616 to your computer and use it in GitHub Desktop.
A Simple Rack Exercise
arg = ARGV[0]
raise "Argument is not passed." unless arg
app = lambda do |env|
[200, {"Content-Type" => "text/plain"}, ["Command line argument you typed was: #{arg}"]]
end
puts app.call({})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment