Sha256: 898dc81bc2371630bfb0c43b3292bc42a43ef95ee35b912e05d8acd95c23b267

Contents?: true

Size: 325 Bytes

Versions: 2

Compression:

Stored size: 325 Bytes

Contents

module Compass::SassExtensions::Functions::Enumerate
  def enumerate(prefix, from, through, separator = nil)
    separator ||= Sass::Script::String.new("-", :string)
    selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator.value}#{i}"}.join(", ")
    Sass::Script::String.new(selectors)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compass-sourcemaps-0.12.3.sourcemaps.a4836f1 lib/compass/sass_extensions/functions/enumerate.rb
compass-sourcemaps-0.12.2.sourcemaps.57a186c lib/compass/sass_extensions/functions/enumerate.rb