Class: Jet::File
- Inherits:
-
Object
- Object
- Jet::File
- Defined in:
- lib/jet/file.rb
Constant Summary collapse
- JAVASCRIPT_EXTENSIONS =
['.js', '.coffee', '.hbs']
- STYLESHEET_EXTENSIONS =
['.css', '.sass', '.scss']
Class Method Summary collapse
Class Method Details
.is_javascript?(file) ⇒ Boolean
7 8 9 |
# File 'lib/jet/file.rb', line 7 def is_javascript?(file) JAVASCRIPT_EXTENSIONS.include?(::File.extname(file)) end |
.is_public?(file) ⇒ Boolean
15 16 17 |
# File 'lib/jet/file.rb', line 15 def is_public?(file) ::File.dirname(file) =~ /^public/ end |
.is_stylesheet?(file) ⇒ Boolean
11 12 13 |
# File 'lib/jet/file.rb', line 11 def is_stylesheet?(file) STYLESHEET_EXTENSIONS.include?(::File.extname(file)) end |