Skip to content

Instantly share code, notes, and snippets.

@ravijain412
Created February 16, 2018 09:14
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 ravijain412/562f883ae04ad6a3ed5d0b45f23faca3 to your computer and use it in GitHub Desktop.
Save ravijain412/562f883ae04ad6a3ed5d0b45f23faca3 to your computer and use it in GitHub Desktop.
if (health.power.charging_status == ‘charging’) & (health.power.battery > 30) {
return result (corresponding to the predicate)
}else if (check for another rule if present in the list of predicate){
return result (corresponding ot the predicate)
}
else {
  return default_rule
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment