Skip to content

Instantly share code, notes, and snippets.

View xjones's full-sized avatar

Russell Johnson xjones

View GitHub Profile
class Document
attr_accessor :sections
def initialize
@sections = []
end
end
class Reader
# should be able to view documents
@xjones
xjones / ExampleClass.m
Created October 21, 2011 21:59 — forked from lukeredpath/ExampleClass.m
Macro for creating your "shared instance" using GCD
@implementation MySharedThing
// Using method 1
//
DEFINE_SHARED_INSTANCE_FOR_CLASS(MySharedThing)
// Using method 2
//
+ (id)sharedInstance
{