Module: SpriteFactory

Defined in:
lib/sprite_factory.rb,
lib/sprite_factory/style.rb,
lib/sprite_factory/runner.rb,
lib/sprite_factory/layout/packed.rb,
lib/sprite_factory/layout/vertical.rb,
lib/sprite_factory/library/rmagick.rb,
lib/sprite_factory/layout/horizontal.rb,
lib/sprite_factory/library/chunky_png.rb,
lib/sprite_factory/library/image_magick.rb

Defined Under Namespace

Modules: Layout, Library, Style Classes: Runner

Constant Summary collapse

VERSION =

"1.6.1"
SUMMARY =
"Automatic CSS sprite generator"
DESCRIPTION =
"Combines individual images from a directory into a single sprite image file and creates an appropriate CSS stylesheet"
LIB =
File.dirname(__FILE__)

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.cssurlObject

Returns the value of attribute cssurl.



27
28
29
# File 'lib/sprite_factory.rb', line 27

def cssurl
  @cssurl
end

.layoutObject

Returns the value of attribute layout.



24
25
26
# File 'lib/sprite_factory.rb', line 24

def layout
  @layout
end

.libraryObject

Returns the value of attribute library.



25
26
27
# File 'lib/sprite_factory.rb', line 25

def library
  @library
end

.nocommentsObject

Returns the value of attribute nocomments.



29
30
31
# File 'lib/sprite_factory.rb', line 29

def nocomments
  @nocomments
end

.pngcrushObject

Returns the value of attribute pngcrush.



28
29
30
# File 'lib/sprite_factory.rb', line 28

def pngcrush
  @pngcrush
end

.reportObject

Returns the value of attribute report.



22
23
24
# File 'lib/sprite_factory.rb', line 22

def report
  @report
end

.selectorObject

Returns the value of attribute selector.



26
27
28
# File 'lib/sprite_factory.rb', line 26

def selector
  @selector
end

.styleObject

Returns the value of attribute style.



23
24
25
# File 'lib/sprite_factory.rb', line 23

def style
  @style
end

Class Method Details

.find_files(*args) ⇒ Object




78
79
80
# File 'lib/sprite_factory.rb', line 78

def self.find_files(*args)
  Dir.glob(args, File::FNM_CASEFOLD).sort # we always do case IN-sensitive file lookups and sort the result
end

.run!(input, config = {}, &block) ⇒ Object



13
14
15
# File 'lib/sprite_factory.rb', line 13

def self.run!(input, config = {}, &block)
  Runner.new(input, config).run!(&block)
end