Sha256: 435e572b89ff7abd2bdc081a1f96124cedd1fcb9a7de88e9ef2aff98cf98ab2d

Contents?: true

Size: 333 Bytes

Versions: 9

Compression:

Stored size: 333 Bytes

Contents

# Compact function pulled from compass
module Wiskey::SassExtensions::Functions::Compact

  def compact(*args)
    sep = :comma
    if args.size == 1 && args.first.is_a?(Sass::Script::List)
      args = args.first.value
      sep = args.first.separator
    end
    Sass::Script::List.new(args.reject{|a| !a.to_bool}, sep)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wiskey-0.0.9 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.8 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.7 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.6 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.5 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.4 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.3 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.2 lib/wiskey/sass_extensions/functions/compact.rb
wiskey-0.0.1 lib/wiskey/sass_extensions/functions/compact.rb