From b0bfb63bb7bf7298a430ca3d723d4c2f2ed8008f Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Sat, 26 Mar 2011 13:53:50 -0400 Subject: [PATCH] removed class variable --- Gemfile.lock | 2 +- .../sass_extensions/sprites/sprites.rb | 26 +++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b66da7c1..eba84349 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/lib/compass/sass_extensions/sprites/sprites.rb b/lib/compass/sass_extensions/sprites/sprites.rb index 8d40c294..d93426fe 100644 --- a/lib/compass/sass_extensions/sprites/sprites.rb +++ b/lib/compass/sass_extensions/sprites/sprites.rb @@ -1,27 +1,25 @@ module Compass class Sprites < Sass::Importers::Base attr_accessor :name, :path - @@maps = {} - class << self - - def path_and_name(uri) - if uri =~ %r{((.+/)?(.+))/(.+?)\.png} - [$1, $3, $4] - end + @maps = {} + + 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