Module: AnotherUploader::MimeTypeGetters
- Included in:
- Upload
- Defined in:
- lib/another_uploader/mime_type_getters.rb
Constant Summary collapse
- MTG =
MimeTypeGroups
Instance Method Summary collapse
- #is_excel? ⇒ Boolean
- #is_image? ⇒ Boolean
- #is_mp3? ⇒ Boolean
- #is_of_type?(type_list) ⇒ Boolean
- #is_pdf? ⇒ Boolean
- #is_text? ⇒ Boolean
- #is_word? ⇒ Boolean
Instance Method Details
#is_excel? ⇒ Boolean
14 |
# File 'lib/another_uploader/mime_type_getters.rb', line 14 def is_excel?; is_of_type?(MTG::EXCEL_TYPES); end |
#is_image? ⇒ Boolean
10 |
# File 'lib/another_uploader/mime_type_getters.rb', line 10 def is_image?; is_of_type?(MTG::IMAGE_TYPES); end |
#is_mp3? ⇒ Boolean
13 |
# File 'lib/another_uploader/mime_type_getters.rb', line 13 def is_mp3?; is_of_type?(MTG::MP3_TYPES); end |
#is_of_type?(type_list) ⇒ Boolean
6 7 8 |
# File 'lib/another_uploader/mime_type_getters.rb', line 6 def is_of_type? type_list type_list.include?(self.local_content_type) end |
#is_pdf? ⇒ Boolean
11 |
# File 'lib/another_uploader/mime_type_getters.rb', line 11 def is_pdf?; is_of_type?(MTG::PDF_TYPES); end |
#is_text? ⇒ Boolean
15 |
# File 'lib/another_uploader/mime_type_getters.rb', line 15 def is_text?; is_of_type?(MTG::TEXT_TYPES); end |
#is_word? ⇒ Boolean
12 |
# File 'lib/another_uploader/mime_type_getters.rb', line 12 def is_word?; is_of_type?(MTG::WORD_TYPES); end |