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.7.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

.excludeObject

Returns the value of attribute exclude.



33
34
35
# File 'lib/sprite_factory.rb', line 33

def exclude
  @exclude
end

.globObject

Returns the value of attribute glob.



31
32
33
# File 'lib/sprite_factory.rb', line 31

def glob
  @glob
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

.sanitizerObject

Returns the value of attribute sanitizer.



32
33
34
# File 'lib/sprite_factory.rb', line 32

def sanitizer
  @sanitizer
end

.selectorObject

Returns the value of attribute selector.



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

def selector
  @selector
end

.separatorObject

Returns the value of attribute separator.



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

def separator
  @separator
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




82
83
84
# File 'lib/sprite_factory.rb', line 82

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