Skip to content

Instantly share code, notes, and snippets.

@rodericj
Created January 7, 2015 18:59
Show Gist options
  • Save rodericj/507c96025f8268217acf to your computer and use it in GitHub Desktop.
Save rodericj/507c96025f8268217acf to your computer and use it in GitHub Desktop.
RAC(cell, type) = [cluster map:^id(NSNumber *clusteringState) {
switch ([clusteringState integerValue]) {
case ClusterNone:
NSLog(@"cluster state is Not Clustered for %@", device.name);
break;
case ClusterMaster:
NSLog(@"cluster state is Clustered and master");
break;
case ClusterMasterPending:
NSLog(@"cluster state is set to clustered master, but pending confirmation for %@", device.name);
break;
case ClusterSlave:
NSLog(@"cluster state is clustered and slave for %@", device.name);
break;
case ClusterSlavePending:
NSLog(@"cluster state is set to clustered slave, but pending confirmation for %@", device.name);
break;
default:
break;
}
return clusteringState;
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment