added boolean functions for finding selectors

This commit is contained in:
Scott Davis 2011-03-21 22:10:44 -04:00
parent 46eec5362d
commit 6e1daf69f5
8 changed files with 15 additions and 3 deletions

View File

@ -1,7 +1,7 @@
PATH PATH
remote: . remote: .
specs: specs:
compass (0.11.beta.3.a9b6d8c) compass (0.11.beta.3.46eec53)
chunky_png (~> 1.1.0) chunky_png (~> 1.1.0)
sass (>= 3.1.0.alpha.249) sass (>= 3.1.0.alpha.249)

View File

@ -71,6 +71,18 @@ module Compass
@images.detect { |img| img.name == name} @images.detect { |img| img.name == name}
end end
def has_hover?(name)
!image_for("#{name}_hover").nil?
end
def has_target?(name)
!image_for("#{name}_target").nil?
end
def has_active?(name)
!image_for("#{name}_active").nil?
end
def sprite_names def sprite_names
image_names.map{|f| Compass::Sprites.sprite_name(f) } image_names.map{|f| Compass::Sprites.sprite_name(f) }
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB