Skip to content

Instantly share code, notes, and snippets.

@joaovitor
Created February 26, 2012 13:44
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 joaovitor/1916894 to your computer and use it in GitHub Desktop.
Save joaovitor/1916894 to your computer and use it in GitHub Desktop.
Escolha da vida

Vários me perguntam. Agulhô o que você quer? Neto ou neta? Nunca tinha respondido tantas vezes essa mesma pergunta. Vou responder com a ajuda de vocês.

Acesse esse site e copie o resultado nos comentários.

require './escolhadavida'
run Sinatra::Application
#encoding: UTF-8
require 'sinatra'
POSSIBILIDADES=%w(Liz Valentin)
# Liz ou Valentin. O que vier ta bom pra mim.
get "/" do
escolha_da_vida=Random.rand(2)
"#{POSSIBILIDADES[escolha_da_vida]} ta bom pra mim!"
end
source 'http://rubygems.org'
gem 'sinatra'
GEM
remote: http://rubygems.org/
specs:
rack (1.4.1)
rack-protection (1.2.0)
rack
sinatra (1.3.2)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
tilt (1.3.3)
PLATFORMS
x86-mingw32
DEPENDENCIES
sinatra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment