Module: Classifile::ExtensionChecker
- Included in:
- State
- Defined in:
- lib/classifile/checker/extension_checker.rb
Overview
Check the file extension to see the file type.
Instance Attribute Summary collapse
-
#extname ⇒ Object
Returns the value of attribute extname.
Instance Method Summary collapse
Instance Attribute Details
#extname ⇒ Object
Returns the value of attribute extname.
7 8 9 |
# File 'lib/classifile/checker/extension_checker.rb', line 7 def extname @extname end |
Instance Method Details
#image? ⇒ Boolean
9 10 11 |
# File 'lib/classifile/checker/extension_checker.rb', line 9 def image? raise Failed if !@gotcha && !FILE_TYPE_IMAGE.include?(@extname) end |
#movie? ⇒ Boolean
17 18 19 |
# File 'lib/classifile/checker/extension_checker.rb', line 17 def movie? raise Failed if !@gotcha && !FILE_TYPE_MOVIE.include?(@extname) end |
#sound? ⇒ Boolean
13 14 15 |
# File 'lib/classifile/checker/extension_checker.rb', line 13 def sound? raise Failed if !@gotcha && !FILE_TYPE_SOUND.include?(@extname) end |