compass/src/test/testData/gems/compass-0.13.alpha.2/lib/compass/configuration/data.rb
# When called with a block, defines the cache buster strategy to be used.
# If the block returns nil or a string, then it is appended to the url as a query parameter.
# In this case, the returned string must not include the starting '?'.
# The block may also return a hash with :path and/or :query values and it
# will replace the original path and query string with the busted values returned.
# The block will be passed the root-relative url of the asset.
# If the block accepts two arguments, it will also be passed a File object
# that points to the asset on disk -- which may or may not exist.
# When called without a block, returns the block that was previously set.
#
# To disable the asset cache buster:
#
#     asset_cache_buster :none
When called with a block, defines the cache buster strategy to be used.
If the block returns nil or a string, then it is appended to the url as a query parameter.
In this case, the returned string must not include the starting '?'.
The block may also return a hash with :path and/or :query values and it
will replace the original path and query string with the busted values returned.
The block will be passed the root-relative url of the asset.
If the block accepts two arguments, it will also be passed a File object
that points to the asset on disk -- which may or may not exist.
When called without a block, returns the block that was previously set.

To disable the asset cache buster.


When called with a block defines the cache buster strategy to be used . If the block returns nil or a string then it is appended to the url as a query parameter . In this case the returned string must not include the starting ' ? ' . The block may also return a hash with : path and / or : query values and it will replace the original path and query string with the busted values returned . The block will be passed the root - relative url of the asset . If the block accepts two arguments it will also be passed a File object that points to the asset on disk -- which may or may not exist . When called without a block returns the block that was previously set . To disable the asset cache buster .
def asset_cache_buster(simple = nil, &block)
        @set_attributes ||= {}
        if block_given?
          @set_attributes[:asset_cache_buster] = true
          @asset_cache_buster = block
        elsif !simple.nil?
          if simple == :none
            @set_attributes[:asset_cache_buster] = true
            @asset_cache_buster = Proc.new {|_,_| nil}
          else
            raise ArgumentError, "Unexpected argument: #{simple.inspect}"
          end
        else
          if set?(:asset_cache_buster)
            @asset_cache_buster
          elsif inherited_data.respond_to?(:asset_cache_buster)
            inherited_data.asset_cache_buster
          end
        end
      end
def asset_cache_buster ( simple = nil , & block ) @set_attributes ||= { } if block_given? @set_attributes [ :asset_cache_buster ] = true @asset_cache_buster = block elsif ! simple . nil? if simple == :none @set_attributes [ :asset_cache_buster ] = true @asset_cache_buster = Proc . new { | _ , _ | nil } else raise ArgumentError , "Unexpected argument: #{simple.inspect}" end else if set? ( :asset_cache_buster ) @asset_cache_buster elsif inherited_data . respond_to? ( :asset_cache_buster ) inherited_data . asset_cache_buster end end end
When called with a block, defines the cache buster strategy to be used.
When called with a block defines the cache buster strategy to be used .
simple
block