Module: TwitterBootstrapSass::SassExtensions::Functions::Compact

Included in:
Sass::Script::Functions
Defined in:
lib/twitter_bootstrap_sass/sass_extensions/functions/compact.rb

Overview

Compact function pulled from compass

Instance Method Summary collapse

Instance Method Details

#compact(*args) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/twitter_bootstrap_sass/sass_extensions/functions/compact.rb', line 4

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