Class: Flms::Block
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Flms::Block
- Defined in:
- app/models/flms/block.rb
Instance Method Summary collapse
-
#scroll_duration ⇒ Object
Return the total scroll duration for this block, taking in to account the fact that layers can and will overlap.
- #thumbnail_uploaded_filename ⇒ Object
Instance Method Details
#scroll_duration ⇒ Object
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_filename ⇒ Object
22 23 24 |
# File 'app/models/flms/block.rb', line 22 def thumbnail_uploaded_filename File.basename(thumbnail.path) if thumbnail? end |