class Abrizer::TemporaryPoster

It is usually better for a human to select a poster image, but we try to select a temporary one. Creating sprites leaves some images around so that is a prerequisite for this step. TODO: selection of a temporary poster image could be improved

Public Class Methods

new(output_dir) click to toggle source
# File lib/abrizer/temporary_poster.rb, line 11
def initialize(output_dir)
  @output_directory = output_dir
end

Public Instance Methods

copy() click to toggle source
# File lib/abrizer/temporary_poster.rb, line 15
def copy
  FileUtils.cp first_image_filepath, poster_image_filepath
  `jpegoptim #{poster_image_filepath}`
  FileUtils.chmod "ugo+r", poster_image_filepath
end