Class: FuzzyNotes::ImageViewer
- Inherits:
-
Object
- Object
- FuzzyNotes::ImageViewer
- Defined in:
- lib/fuzzy_notes/image_viewer.rb
Constant Summary collapse
- IMG_EXTS =
['tif', 'tiff', 'gif', 'jpeg', 'jpg', 'png', 'pdf']
Class Method Summary collapse
Class Method Details
.display(viewer, path) ⇒ Object
4 5 6 |
# File 'lib/fuzzy_notes/image_viewer.rb', line 4 def self.display(viewer, path) `#{viewer} #{path}` end |
.image?(path) ⇒ Boolean
8 9 10 |
# File 'lib/fuzzy_notes/image_viewer.rb', line 8 def self.image?(path) IMG_EXTS.include?(File.extname(path)[1..-1]) end |