Class: TokenReel::Generator
- Inherits:
-
Object
- Object
- TokenReel::Generator
- Defined in:
- lib/token_reel/generator.rb
Instance Method Summary collapse
-
#generate! ⇒ Object
Returns the output path on success.
-
#initialize(config) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
Instance Method Details
#generate! ⇒ Object
Returns the output path on success.
16 17 18 19 20 21 22 23 24 |
# File 'lib/token_reel/generator.rb', line 16 def generate! workdir = @config.keep_frames ? make_persistent_workdir : nil Dir.mktmpdir do |tmp| dir = workdir || tmp frames = sample_and_render(dir) GifWriter.assemble(frames, @config.out, @config.loop_count) end @config.out end |