Last active
August 29, 2015 14:03
-
-
Save maxjacobson/9244b99019d4fad3832f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first run: gem install sinatra film_snob | |
# then run ruby film_snob_sinatra.rb | |
# then visit http://localhost:4567 | |
require 'sinatra' | |
require 'film_snob' | |
get '/' do | |
@url = params[:url] | |
@film = FilmSnob.new(@url) | |
erb :home | |
end | |
__END__ | |
@@home | |
<% if @film.watchable? %> | |
<%= @film.html %> | |
<% end %> | |
<form action='/'> | |
<input type='text' name='url' value='<%= @url %>' /> | |
<input type='submit' /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment