Created
January 24, 2014 02:09
-
-
Save tokorom/8590869 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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