Skip to content

Instantly share code, notes, and snippets.

@maasha
Created April 16, 2015 15:21
Show Gist options
  • Save maasha/69aaee9255496ebfdae6 to your computer and use it in GitHub Desktop.
Save maasha/69aaee9255496ebfdae6 to your computer and use it in GitHub Desktop.
def exact_match_key_values?(record, keys)
keys.each do |key|
return true if @exact.include?(key)
if (value = record[key])
return true if value.is_a?(String) && @exact.include?(value.to_sym)
return true if !value.is_a?(String) && @exact.include?(value)
end
end
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment