Skip to content

Instantly share code, notes, and snippets.

@jzajpt
jzajpt / gist:1826036
Created February 14, 2012 11:33 — forked from zachy/gist:1825836
require 'imgkit'
class InvalidInputFileError < Exception; end
class Converter
def initialize(input, output = nil)
raise InvalidInputFileError unless html_file?(input)
@input = input
if @output
@ouput = output
# Switch to Ruby 1.8.7
rvm use 1.8.7
# Print out the ruby version
ruby -v
# But the output of this is:
#
# $ ./tryrvm
# <i> Now using ruby 1.8.7 p249 </i>
require 'mongomapper'
class Media
include MongoMapper::EmbeddedDocument
key :file, String
end
class Video < Media
key :length, Integer
end