def rename_if(attributes, conditions = {})
      if block_given?
        set(attributes) if yield self
      else
        set(attributes) if conditions.all? do |key, value|
          respond_to?(key) && send(key) == value
        end
      end

      self
    end
def rename_if(attributes, conditions = {})
      if block_given?
        set(attributes) if yield self
      else
        set(attributes) if conditions.all? do |key, value|
          respond_to?(key) && send(key) == value
        end
      end

      self
    end
Renames the tokens according to the passed-in attributes if all of the
 conditions match or if the given block returns true.