Class: RugularAssets
- Inherits:
-
Object
- Object
- RugularAssets
- Defined in:
- lib/rugular/tasks/server/guards/rugular_assets.rb
Class Method Summary collapse
- .copy_font(file) ⇒ Object
- .copy_image(file) ⇒ Object
- .delete_font(file) ⇒ Object
- .delete_image(file) ⇒ Object
Class Method Details
.copy_font(file) ⇒ Object
7 8 9 10 |
# File 'lib/rugular/tasks/server/guards/rugular_assets.rb', line 7 def self.copy_font(file) FileUtils.mkdir('.tmp/fonts') unless File.directory? '.tmp/fonts' FileUtils.cp(file, ".tmp/fonts/#{File.basename(file)}") end |
.copy_image(file) ⇒ Object
2 3 4 5 |
# File 'lib/rugular/tasks/server/guards/rugular_assets.rb', line 2 def self.copy_image(file) FileUtils.mkdir('.tmp/images') unless File.directory? '.tmp/images' FileUtils.cp(file, ".tmp/images/#{File.basename(file)}") end |
.delete_font(file) ⇒ Object
16 17 18 |
# File 'lib/rugular/tasks/server/guards/rugular_assets.rb', line 16 def self.delete_font(file) FileUtils.rm(".tmp/fonts/#{File.basename(file)}") end |
.delete_image(file) ⇒ Object
12 13 14 |
# File 'lib/rugular/tasks/server/guards/rugular_assets.rb', line 12 def self.delete_image(file) FileUtils.rm(".tmp/images/#{File.basename(file)}") end |