Module: Pageflow::BuiltInFileType
- Defined in:
- lib/pageflow/built_in_file_type.rb
Class Method Summary collapse
- .audio ⇒ Object
-
.image ⇒ Object
Factory methods to decouple Pageflow initializers from concrete file type classes, making more transparent which file types are available as built-ins.
- .other ⇒ Object
- .text_track ⇒ Object
- .video ⇒ Object
Class Method Details
.audio ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/pageflow/built_in_file_type.rb', line 29 def self.audio FileType.new(model: 'Pageflow::AudioFile', partial: 'pageflow/audio_files/audio_file', editor_partial: 'pageflow/editor/audio_files/audio_file', collection_name: 'audio_files', url_templates: AudioFileUrlTemplates.new, top_level_type: true, nested_file_types: [BuiltInFileType.text_track]) end |
.image ⇒ Object
Factory methods to decouple Pageflow initializers from concrete file type classes, making more transparent which file types are available as built-ins.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pageflow/built_in_file_type.rb', line 6 def self.image FileType.new(model: 'Pageflow::ImageFile', partial: 'pageflow/image_files/image_file', editor_partial: 'pageflow/editor/image_files/image_file', collection_name: 'image_files', url_templates: ImageFileUrlTemplates.new, css_background_image_urls: ImageFileCssBackgroundImageUrls.new, css_background_image_class_prefix: 'image', top_level_type: true) end |
.other ⇒ Object
45 46 47 48 49 50 |
# File 'lib/pageflow/built_in_file_type.rb', line 45 def self.other FileType.new(model: 'Pageflow::OtherFile', collection_name: 'other_files', url_templates: OtherFileUrlTemplates.new, top_level_type: true) end |
.text_track ⇒ Object
39 40 41 42 43 |
# File 'lib/pageflow/built_in_file_type.rb', line 39 def self.text_track FileType.new(model: 'Pageflow::TextTrackFile', collection_name: 'text_track_files', url_templates: TextTrackFileUrlTemplates.new) end |
.video ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pageflow/built_in_file_type.rb', line 17 def self.video FileType.new(model: 'Pageflow::VideoFile', partial: 'pageflow/video_files/video_file', editor_partial: 'pageflow/editor/video_files/video_file', collection_name: 'video_files', url_templates: VideoFileUrlTemplates.new, css_background_image_urls: VideoFileCssBackgroundImageUrls.new, css_background_image_class_prefix: 'video_poster', top_level_type: true, nested_file_types: [BuiltInFileType.text_track]) end |