removed class variable

This commit is contained in:
Scott Davis 2011-03-26 13:53:50 -04:00
parent a2200b1d83
commit b0bfb63bb7
2 changed files with 13 additions and 15 deletions

View File

@ -7,7 +7,7 @@ GIT
PATH
remote: .
specs:
compass (0.11.beta.4.27735a9)
compass (0.11.beta.4.a2200b1)
chunky_png (~> 1.1.0)
sass (>= 3.1.0.alpha.249)

View File

@ -1,27 +1,25 @@
module Compass
class Sprites < Sass::Importers::Base
attr_accessor :name, :path
@@maps = {}
class << self
@maps = {}
def path_and_name(uri)
if uri =~ %r{((.+/)?(.+))/(.+?)\.png}
[$1, $3, $4]
end
def self.path_and_name(uri)
if uri =~ %r{((.+/)?(.+))/(.+?)\.png}
[$1, $3, $4]
end
end
def discover_sprites(uri)
self.load_map(uri, options).files
end
def self.discover_sprites(uri)
self.load_map(uri, options).files
end
def sprite_name(file)
File.basename(file, '.png')
end
def self.sprite_name(file)
File.basename(file, '.png')
end
def self.load_map(uri, options)
key = self.key(uri, options)
@@maps[key] ||= SpriteMap.new(uri, options)
@maps[key] ||= SpriteMap.new(uri, options)
end