Module: Compass::Core::SassExtensions::Functions::Enumerate

Included in:
Sass::Script::Functions
Defined in:
lib/compass/core/sass_extensions/functions/enumerate.rb

Instance Method Summary collapse

Instance Method Details

#enumerate(prefix, from, through, separator = nil) ⇒ Object



2
3
4
5
6
# File 'lib/compass/core/sass_extensions/functions/enumerate.rb', line 2

def enumerate(prefix, from, through, separator = nil)
  separator ||= identifier("-")
  selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator.value}#{i}"}.join(", ")
  identifier(selectors)
end