maybe

    case value
    when Numeric
      value != 0 ? 1 : 0
    when String
      ['true', 'yes', 't', '1' ].include?(value.to_s.downcase) ? 1 : 0
    else
      value ? 1 : 0
    end