lib/rubo/brain.rb
# If fuzzy name is an exact match for a user,
# returns an array with just that user.
# Otherwise, returns an array of all users
# for which fuzzy name is a raw fuzzy match
#
# @see #users_for_raw_fuzzy_name
# @param fuzzy_name [String]
# @return [Array<User>]
If fuzzy name is an exact match for a user,
returns an array with just that user.
Otherwise, returns an array of all users
for which fuzzy name is a raw fuzzy match
If fuzzy name is an exact match for a user returns an array with just that user . Otherwise returns an array of all users for which fuzzy name is a raw fuzzy match
def users_for_fuzzy_name(fuzzy_name)
      matched_users = users_for_raw_fuzzy_name(fuzzy_name)
      lower_fuzzy_name = fuzzy_name.downcase
      matched_users.find do |user|
        [user] if user.name.downcase == lower_fuzzy_name
      end
    end
def users_for_fuzzy_name ( fuzzy_name ) matched_users = users_for_raw_fuzzy_name ( fuzzy_name ) lower_fuzzy_name = fuzzy_name . downcase matched_users . find do | user | [ user ] if user . name . downcase == lower_fuzzy_name end end
If fuzzy name is an exact match for a user,
returns an array with just that user.
If fuzzy name is an exact match for a user returns an array with just that user .
None
Array<User>
fuzzy_name
<not_specific>
<not_specific>
None
see
None