Skip to content

Instantly share code, notes, and snippets.

@alexcurylo
Created June 8, 2016 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexcurylo/77f2b117c60a08ed3d05994e5bcf6876 to your computer and use it in GitHub Desktop.
Save alexcurylo/77f2b117c60a08ed3d05994e5bcf6876 to your computer and use it in GitHub Desktop.
Guard failure diagnosis
guard let keypath = dictionary["field"] as? String,
let rule = dictionary["rule"] as? String,
let comparator = FormFieldDisplayRuleComparator(rawValue: rule),
let value = dictionary["value"]
else
{
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment