Module: Ddr::Captionable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Component
- Defined in:
- app/models/concerns/ddr/captionable.rb
Instance Method Summary collapse
-
#caption_extension ⇒ Object
This method is used in dul-hydra ‘ComponentsController’ and ddr-public ‘CaptionsController’.
- #caption_path ⇒ Object
- #caption_type ⇒ Object
Instance Method Details
#caption_extension ⇒ Object
This method is used in dul-hydra ‘ComponentsController’ and ddr-public ‘CaptionsController’
14 15 16 17 18 |
# File 'app/models/concerns/ddr/captionable.rb', line 14 def caption_extension if filename = caption&.original_filename ::File.extname(filename) end end |
#caption_path ⇒ Object
20 21 22 |
# File 'app/models/concerns/ddr/captionable.rb', line 20 def caption_path caption&.file&.disk_path end |
#caption_type ⇒ Object
9 10 11 |
# File 'app/models/concerns/ddr/captionable.rb', line 9 def caption_type caption&.media_type end |