getRuleBehavior method

SnapRuleBehavior getRuleBehavior({
  1. required SnapSource source,
})

Gets the applicable SnapRuleBehavior for the given SnapSource.

This method can be used to check SnapRuleBehavior of a valid SnapSource directly, without needing to synchronize the SnapSettings.sourceSettings collection on SnapSettings and get SnapSourceSettings.ruleBehavior.

Parameters:

  • source — The SnapSource to retrieve snap rules for.

Return Value: The applicable SnapRules for the given SnapSource.