Class: Flms::Block

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/flms/block.rb

Instance Method Summary collapse

Instance Method Details

#scroll_durationObject

Return the total scroll duration for this block, taking in to account the fact that layers can and will overlap. Return 0 if block has no layers.



18
19
20
# File 'app/models/flms/block.rb', line 18

def scroll_duration
  layers.map(&:scroll_end).max || 0
end

#thumbnail_uploaded_filenameObject



22
23
24
# File 'app/models/flms/block.rb', line 22

def thumbnail_uploaded_filename
  File.basename(thumbnail.path) if thumbnail?
end