compass/src/test/testData/gems/compass-0.13.alpha.2/lib/compass/sass_extensions/functions/lists.rb
# slice a sublist from a list
slice a sublist from a list
slice a sublist from a list
def _compass_slice(list, start_index, end_index = nil)
    end_index ||= Sass::Script::Number.new(-1)
    start_index = start_index.value
    end_index = end_index.value
    start_index -= 1 unless start_index < 0
    end_index -= 1 unless end_index < 0
    Sass::Script::List.new list.values[start_index..end_index], list.separator
  end
def _compass_slice ( list , start_index , end_index = nil ) end_index ||= Sass :: Script :: Number . new ( - 1 ) start_index = start_index . value end_index = end_index . value start_index -= 1 unless start_index < 0 end_index -= 1 unless end_index < 0 Sass :: Script :: List . new list . values [ start_index .. end_index ] , list . separator end
slice a sublist from a list
slice a sublist from a list
list
start_index
end_index