public
Description: I.A.N. - Intelligent Artificial Nerd
Homepage:
Clone URL: git://github.com/andrew/ian.git
rawnet (author)
Tue Apr 14 01:12:23 -0700 2009
andrew (committer)
Tue Apr 14 12:31:19 -0700 2009
ian / ian.rb
100644 22 lines (17 sloc) 0.314 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'rubygems'
require 'sinatra'
require 'twitter'
 
set :haml, {:format => :html5 }
 
get '/' do
  haml :index
end
 
get '/update' do
  speak
end
 
get '/stylesheet.css' do
  headers 'Content-Type' => 'text/css; charset=utf-8'
  sass :stylesheet
end
 
def speak
  Twitter::Search.new('red dwarf').first['text']
end