Object#to_weak_bool

(Weak as in weak typing.)

See Object#to_bool first.

class Object
  def to_weak_bool
    # This covers nil and false
    self ? true : false
  end
end

class String
  def to_weak_bool
    size > 0
  end
end

class Array
  def to_weak_bool
    size > 0
  end
end

…and so on.

When is this useful? No idea!