compass/src/test/testData/gems/compass-0.13.alpha.2/lib/compass/sass_extensions/functions/lists.rb
def blank(obj)
    case obj
    when Sass::Script::Bool
      Sass::Script::Bool.new !obj.to_bool
    when Sass::Script::String
      Sass::Script::Bool.new obj.value.strip.size == 0
    when Sass::Script::List
      Sass::Script::Bool.new obj.value.size == 0 || obj.value.all?{|el| blank(el).to_bool}
    else
      Sass::Script::Bool.new false
    end
  end
# Returns true when the object is false, an empty string, or an empty list
Returns true when the object is false, an empty string, or an empty list
Returns true when the object is false an empty string or an empty list
def blank(obj)
    case obj
    when Sass::Script::Bool
      Sass::Script::Bool.new !obj.to_bool
    when Sass::Script::String
      Sass::Script::Bool.new obj.value.strip.size == 0
    when Sass::Script::List
      Sass::Script::Bool.new obj.value.size == 0 || obj.value.all?{|el| blank(el).to_bool}
    else
      Sass::Script::Bool.new false
    end
  end
def blank ( obj ) case obj when Sass :: Script :: Bool Sass :: Script :: Bool . new ! obj . to_bool when Sass :: Script :: String Sass :: Script :: Bool . new obj . value . strip . size == 0 when Sass :: Script :: List Sass :: Script :: Bool . new obj . value . size == 0 || obj . value . all? { | el | blank ( el ) . to_bool } else Sass :: Script :: Bool . new false end end
Returns true when the object is false, an empty string, or an empty list
Returns true when the object is false an empty string or an empty list
obj