Skip to content

Instantly share code, notes, and snippets.

@tomatrow
Last active August 18, 2017 21:39
Show Gist options
  • Save tomatrow/8382023 to your computer and use it in GitHub Desktop.
Save tomatrow/8382023 to your computer and use it in GitHub Desktop.
A
//
// BSBTopping.m
// BaltimoreSnowball
//
// Created by AJ Caldwell on 1/11/14.
// Copyright (c) 2014 AJ Caldwell. All rights reserved.
//
#import "BSBTopping.h"
#import "BSBConstants.h"
@interface BSBTopping ()
@end
@implementation BSBTopping
+ (NSDictionary*) namesAndDescriptions {
static NSDictionary* namesAndDescriptionsDictionary = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken,^{
namesAndDescriptionsDictionary = @{
@"Marshmallow Creme" : @"Run! Grab the keymaster!",
@"Whip Cream" : @"Makes you sick.",
@"Chocolate Sauce" : @"YAY",
@"Peanut Butter Sauce" : @"Now we need Jeely sauce.",
@"Sour Spray" : @"With/without areosol.",
@"Honey" : @"It never goes bad. ",
@"Chocolate Fudge" : @"Fudgggge.",
@"Chamoy" : @"What is this?",
@"Tajin" : @"Some kind of Chinese trap.",
@"Sprinkles" : @"Sprinkles."
};
});
return namesAndDescriptionsDictionary;
}
+ (NSOrderedSet*) allServingSizes {
static NSOrderedSet* allServingSizes;
// TODO Get the actual sizes of these servings.
// These numbers represent light, normal and extra(for now).
if (!allServingSizes)
allServingSizes = [[NSOrderedSet alloc] initWithArray:@[
@(BSBTOPPING_BASE_WEIGHT*1),
@(BSBTOPPING_BASE_WEIGHT*2),
@(BSBTOPPING_BASE_WEIGHT*3)]];
return allServingSizes;
}
@end
@tomatrow
Copy link
Author

And I forgot static. Nice.
Edit* Edited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment