refuse static method

StructuredResponse? refuse(
  1. DeviceTarget device,
  2. Ability ability
)

ability on device: a refusal when the device lacks it, null when it has it.

Implementation

static StructuredResponse? refuse(DeviceTarget device, Ability ability) {
  final gap = device.abilities.gaps[ability];
  return gap == null ? null : StructuredResponse.notOnThisDevice(ability, gap);
}