Class: Lash::SpriteBundler
- Inherits:
-
Object
- Object
- Lash::SpriteBundler
- Defined in:
- lib/lash/sprite_bundler.rb
Overview
Bundles a series of loose images into a single CSS sprite and generates a corresponding CSS support files
Instance Method Summary collapse
-
#bundle(directory, options = nil) ⇒ Object
Bundles the images in the given directory into a single large CSS sprite image.
Instance Method Details
#bundle(directory, options = nil) ⇒ Object
Bundles the images in the given directory into a single large CSS sprite image
25 26 27 28 29 30 31 32 |
# File 'lib/lash/sprite_bundler.rb', line 25 def bundle( directory, = nil ) = ( || {}, directory ) sprite = create_sprite_image( ) generate_css( sprite, ) puts "=> bundled css at #{ Lash::Files.relative_to( [:css_file], Rails.root )}" if [:log] end |