Skip to content

Commit

Permalink
Less joins. More responding.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseppstein committed Dec 6, 2010
1 parent 027ebdd commit 472456f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/compass/sass_extensions/functions/sprites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def construct_sprite

# 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
Expand All @@ -152,7 +152,7 @@ def save!(output_png)
# 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

Expand All @@ -177,6 +177,10 @@ def to_s(options = self.options)
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)
Expand Down

0 comments on commit 472456f

Please sign in to comment.