class String

  def to_bool
    value = to_str
    !(value.nil? || value == "" || value =~ /^(false|f|no|n|0)$/i || value == false)
  end

end