Sha256: 81ea8a032801d2791d0e93c97f770e4351874cfe0d79f696a4b4e3eb4ae9550d

Contents?: true

Size: 319 Bytes

Versions: 70

Compression:

Stored size: 319 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

70 entries across 69 versions & 5 rubygems

Version Path
compass-0.12.7 lib/compass/sass_extensions/functions/enumerate.rb
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/compass-0.12.3/lib/compass/sass_extensions/functions/enumerate.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/compass-0.12.3/lib/compass/sass_extensions/functions/enumerate.rb
compass-0.12.6 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.12.5 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.12.4 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.12.3 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.12 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.10 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.9 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.8 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.7 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.6 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.5 lib/compass/sass_extensions/functions/enumerate.rb
compass-sourcemaps-0.12.4.sourcemaps.a4836f1 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.4 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.3 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.13.alpha.2 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.12.2 lib/compass/sass_extensions/functions/enumerate.rb
compass-0.12.2.rc.1 lib/compass/sass_extensions/functions/enumerate.rb