From 472456f344a7151448a6221b6dc8373b63c48fa3 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Tue, 30 Nov 2010 20:23:01 -0800 Subject: [PATCH] Less joins. More responding. --- lib/compass/sass_extensions/functions/sprites.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb index 7b1b6d65..0aa06da9 100644 --- a/lib/compass/sass_extensions/functions/sprites.rb +++ b/lib/compass/sass_extensions/functions/sprites.rb @@ -141,7 +141,7 @@ module Compass::SassExtensions::Functions::Sprites # The on-the-disk filename of the sprite def filename - File.join(File.join(Compass.configuration.images_path, "#{path}.png")) + File.join(Compass.configuration.images_path, "#{path}.png") end # saves the sprite for later retrieval @@ -152,7 +152,7 @@ module Compass::SassExtensions::Functions::Sprites # All the full-path filenames involved in this sprite def image_filenames image_names.map do |image_name| - File.join(File.join(Compass.configuration.images_path, image_name)) + File.join(Compass.configuration.images_path, image_name) end end @@ -177,6 +177,10 @@ module Compass::SassExtensions::Functions::Sprites sprite_url(self).value end + def respond_to?(meth) + super || @evaluation_context.respond_to?(meth) + end + def method_missing(meth, *args, &block) if @evaluation_context.respond_to?(meth) @evaluation_context.send(meth, *args, &block)