Returns true if the image name has an active selector image
# File lib/compass/sass_extensions/sprites/image_methods.rb, line 21 def has_active?(name) !image_for("#{name}_active").nil? end
Returns true if the image name has a hover selector image
# File lib/compass/sass_extensions/sprites/image_methods.rb, line 11 def has_hover?(name) !image_for("#{name}_hover").nil? end
Returns true if the image name has a target selector image
# File lib/compass/sass_extensions/sprites/image_methods.rb, line 16 def has_target?(name) !image_for("#{name}_target").nil? end
Fetches the Sprite::Image object for the supplied name
# File lib/compass/sass_extensions/sprites/image_methods.rb, line 6 def image_for(name) @images.detect { |img| img.name == name} end
Return and array of image names that make up this sprite
# File lib/compass/sass_extensions/sprites/image_methods.rb, line 26 def sprite_names image_names.map { |f| File.basename(f, '.png') } end