Skip to content

Instantly share code, notes, and snippets.

@tokorom
Created January 24, 2014 02:09
Show Gist options
  • Save tokorom/8590869 to your computer and use it in GitHub Desktop.
Save tokorom/8590869 to your computer and use it in GitHub Desktop.
#!/usr/bin/env objc-run
@import Foundation;
//----------------------------------------------------------------------------//
#pragma mark - interface
//----------------------------------------------------------------------------//
@interface Sample : NSObject
- (NSNumber *)identifier;
@end
//----------------------------------------------------------------------------//
#pragma mark - implementation
//----------------------------------------------------------------------------//
@interface Sample ()
@property (copy) NSNumber *identifier;
@end
@implementation Sample
- (instancetype)init
{
if ((self = [super init])) {
self.identifier = @100;
}
return self;
}
@end
//----------------------------------------------------------------------------//
#pragma mark - main
//----------------------------------------------------------------------------//
int main(int argc, const char *argv[])
{
Sample *sample = [Sample new];
NSLog(@"say: %@", sample.identifier);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment