appjam 0.1.8.7 → 0.1.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/README.md +9 -1
  2. data/lib/appjam/generators/help.rb +1 -1
  3. data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.pbxproj +356 -0
  4. data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  5. data/lib/appjam/generators/templates/blank/EiffelApplication/AppDelegate.h.tt +3 -3
  6. data/lib/appjam/generators/templates/blank/EiffelApplication/AppDelegate.m.tt +5 -5
  7. data/lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication-Info.plist +1 -1
  8. data/lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication-Prefix.pch.tt +1 -1
  9. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/Toast/Toast+UIView.h +51 -0
  10. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/Toast/Toast+UIView.m +315 -0
  11. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/RaptureXML/RXMLElement.h +97 -0
  12. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/RaptureXML/RXMLElement.m +450 -0
  13. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Objective-C-HMTL-Parser/HTMLNode.h +111 -0
  14. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Objective-C-HMTL-Parser/HTMLNode.m +412 -0
  15. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Objective-C-HMTL-Parser/HTMLParser.h +37 -0
  16. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/Objective-C-HMTL-Parser/HTMLParser.m +130 -0
  17. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSArray+ObjectiveSugar.h +39 -0
  18. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSArray+ObjectiveSugar.m +145 -0
  19. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSDictionary+ObjectiveSugar.h +18 -0
  20. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSDictionary+ObjectiveSugar.m +42 -0
  21. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.h +18 -0
  22. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSMutableArray+ObjectiveSugar.m +37 -0
  23. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSNumber+ObjectiveSugar.h +45 -0
  24. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSNumber+ObjectiveSugar.m +117 -0
  25. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSSet+ObjectiveSugar.h +21 -0
  26. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSSet+ObjectiveSugar.m +50 -0
  27. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSString+ObjectiveSugar.h +17 -0
  28. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/NSString+ObjectiveSugar.m +43 -0
  29. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/ObjectiveSugar/ObjectiveSugar.h +10 -0
  30. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SSKeychain/SSKeychain.h +160 -0
  31. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SSKeychain/SSKeychain.m +79 -0
  32. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SSKeychain/SSKeychainQuery.h +80 -0
  33. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SSKeychain/SSKeychainQuery.m +228 -0
  34. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SecureUDID/SecureUDID.h +75 -0
  35. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SecureUDID/SecureUDID.m +679 -0
  36. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/NSString+Versioning.h +41 -0
  37. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/NSString+Versioning.m +71 -0
  38. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SS+Functions.h +38 -0
  39. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SS+Functions.m +122 -0
  40. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SS+System.h +41 -0
  41. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SS+System.m +132 -0
  42. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Helpers/SSArguments.h +156 -0
  43. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSArray+JavaScript.h +46 -0
  44. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSArray+JavaScript.m +135 -0
  45. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDate+JavaScript.h +42 -0
  46. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDate+JavaScript.m +90 -0
  47. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDictionary+JavaScript.h +38 -0
  48. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSDictionary+JavaScript.m +38 -0
  49. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableArray+JavaScript.h +46 -0
  50. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableArray+JavaScript.m +131 -0
  51. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.h +36 -0
  52. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableDictionary+JavaScript.m +42 -0
  53. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableString+JavaScript.h +36 -0
  54. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSMutableString+JavaScript.m +42 -0
  55. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSNumber+JavaScript.h +36 -0
  56. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSNumber+JavaScript.m +44 -0
  57. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSObject+JavaScript.h +50 -0
  58. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSObject+JavaScript.m +114 -0
  59. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSString+JavaScript.h +43 -0
  60. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/NSString+JavaScript.m +94 -0
  61. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/SS+JavaScript.h +52 -0
  62. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/SS+JavaScript.m +168 -0
  63. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/SS+Types.h +42 -0
  64. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/JavaScript/SS+Types.m +42 -0
  65. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/NSDictionary+NamedProperties.h +41 -0
  66. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/NSDictionary+NamedProperties.m +271 -0
  67. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SS.h +36 -0
  68. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SS.m +38 -0
  69. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SubjectiveScript.h +67 -0
  70. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/SubjectiveScript.m +30 -0
  71. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSArray+SS.h +58 -0
  72. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSArray+SS.m +152 -0
  73. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSDate+SS.h +37 -0
  74. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSDate+SS.m +47 -0
  75. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSDictionary+SS.h +45 -0
  76. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSDictionary+SS.m +61 -0
  77. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableArray+SS.h +43 -0
  78. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableArray+SS.m +83 -0
  79. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableDictionary+SS.h +47 -0
  80. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableDictionary+SS.m +100 -0
  81. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableString+SS.h +42 -0
  82. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSMutableString+SS.m +70 -0
  83. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSNumber+SS.h +51 -0
  84. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSNumber+SS.m +86 -0
  85. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSObject+SS.h +54 -0
  86. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSObject+SS.m +153 -0
  87. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSString+SS.h +46 -0
  88. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/NSString+SS.m +91 -0
  89. data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/SubjectiveScript/Types/SSTypes.h +67 -0
  90. data/lib/appjam/generators/templates/blank/EiffelApplicationTests/EiffelApplicationTests-Info.plist +1 -1
  91. data/lib/appjam/generators/templates/blank/EiffelApplicationTests/EiffelApplicationTests.h.tt +5 -5
  92. data/lib/appjam/generators/templates/blank/EiffelApplicationTests/EiffelApplicationTests.m.tt +7 -7
  93. data/lib/appjam/version.rb +1 -1
  94. metadata +84 -3
@@ -0,0 +1,38 @@
1
+ //
2
+ // NSDictionary+JavaScript.h
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "SSTypes.h"
31
+
32
+ @interface NSDictionary (JavaScript)
33
+
34
+ - (NSS*(^)())toString;
35
+
36
+ - (B(^)(id key))hasOwnProperty;
37
+
38
+ @end
@@ -0,0 +1,38 @@
1
+ //
2
+ // NSDictionary+JavaScript.m
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "NSDictionary+JavaScript.h"
31
+
32
+ @implementation NSDictionary (JavaScript)
33
+
34
+ - (NSS*(^)())toString { return ^{ return @"[object Object]"; }; }
35
+
36
+ - (B(^)(id key))hasOwnProperty { return ^B(id key) { return [self objectForKey:key] != nil; }; }
37
+
38
+ @end
@@ -0,0 +1,46 @@
1
+ //
2
+ // NSMutableArray+JavaScript.h
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "SSTypes.h"
31
+
32
+ @interface NSMutableArray (JavaScript)
33
+
34
+ // accessor Array functions
35
+ - (A*(^)(NSA* other))concat;
36
+ - (A*(^)())reverse;
37
+
38
+ // mutator Array functions
39
+ - (NSO*(^)())pop;
40
+ - (A*(^)(id value))push;
41
+ - (A*(^)(SSSortBlock iterator))sort;
42
+ - (NSA*(^)(I start, I count, id item1, ... /* NIL_TERMINATED */))splice;
43
+ - (A*(^)(id item1, ... /* NIL_TERMINATED */))unshift;
44
+ - (NSO*(^)())shift;
45
+
46
+ @end
@@ -0,0 +1,131 @@
1
+ //
2
+ // NSMutableArray+JavaScript.m
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "NSMutableArray+JavaScript.h"
31
+ #import "NSMutableArray+SS.h"
32
+ #import "NSArray+SS.h"
33
+ #import "SS+Types.h"
34
+ #import "SSArguments.h"
35
+
36
+ @implementation NSMutableArray (JavaScript)
37
+
38
+ // accessor Array functions
39
+ - (A*(^)(NSA* other))concat
40
+ {
41
+ return ^(NSA* other) {
42
+ A* result = self.mutableCopy;
43
+ [result addObjectsFromArray:other];
44
+ return result;
45
+ };
46
+ }
47
+
48
+ // mutator Array functions
49
+ - (A*(^)(id))push
50
+ {
51
+ return ^(id value) {
52
+ [self addObject:value];
53
+ return self;
54
+ };
55
+ }
56
+
57
+ - (NSO*(^)())pop
58
+ {
59
+ return ^() {
60
+ id value = [self lastObject];
61
+ [self removeLastObject];
62
+ return value;
63
+ };
64
+ }
65
+
66
+ - (A*(^)())reverse
67
+ {
68
+ return ^{
69
+ A* result = A.newC(self.count);
70
+ for (id item in self.reverseObjectEnumerator) {
71
+ [result addObject:item];
72
+ }
73
+ return result;
74
+ };
75
+ }
76
+
77
+ - (A*(^)(SSSortBlock iterator))sort
78
+ {
79
+ return ^(SSSortBlock block) {
80
+ if (SS.isBlock(block))
81
+ [self sortUsingComparator:block];
82
+ else
83
+ [self sortUsingSelector:@selector(compare:)];
84
+ return self;
85
+ };
86
+ }
87
+
88
+ - (NSA*(^)(I start, I count, id item1, ... /* NIL_TERMINATED */))splice
89
+ {
90
+ return ^(I start, I count, id item1, ... /* NIL_TERMINATED */) {
91
+ ARGS_AO(items, item1);
92
+
93
+ NSA* results;
94
+ NSRange range = self.resolveRange(start, count);
95
+ if (range.length>0)
96
+ {
97
+ results = [self subarrayWithRange:range];
98
+ [self removeObjectsInRange:range];
99
+ }
100
+ else
101
+ results = NSA.new;
102
+
103
+ for (id item in items.reverseObjectEnumerator)
104
+ [self insertObject:item atIndex:range.location];
105
+
106
+ return results;
107
+ };
108
+ }
109
+
110
+ - (A*(^)(id item1, ...))unshift
111
+ {
112
+ return ^(id item1, ...) {
113
+ ARGS_AO(items, item1);
114
+ for (id item in items.reverseObjectEnumerator)
115
+ [self insertObject:item atIndex:0];
116
+
117
+ return self;
118
+ };
119
+ }
120
+
121
+ - (NSO*(^)())shift
122
+ {
123
+ return ^NSO*() {
124
+ if (!self.count) return nil;
125
+ id value = [self objectAtIndex:0];
126
+ [self removeObjectAtIndex:0];
127
+ return value;
128
+ };
129
+ }
130
+
131
+ @end
@@ -0,0 +1,36 @@
1
+ //
2
+ // NSMutableDictionary+JavaScript.h
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "SSTypes.h"
31
+
32
+ @interface NSMutableDictionary (JavaScript)
33
+
34
+ - (O*(^)(id key))delete_;
35
+
36
+ @end
@@ -0,0 +1,42 @@
1
+ //
2
+ // NSMutableDictionary+JavaScript.m
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "NSMutableDictionary+JavaScript.h"
31
+
32
+ @implementation NSMutableDictionary (JavaScript)
33
+
34
+ - (O*(^)(id key))delete_
35
+ {
36
+ return ^(id key) {
37
+ [self removeObjectForKey:key];
38
+ return self;
39
+ };
40
+ }
41
+
42
+ @end
@@ -0,0 +1,36 @@
1
+ //
2
+ // NSMutableString+JavaScript.h
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "SSTypes.h"
31
+
32
+ @interface NSMutableString (JavaScript)
33
+
34
+ - (S*(^)(NSS* value))append;
35
+
36
+ @end
@@ -0,0 +1,42 @@
1
+ //
2
+ // NSMutableString+JavaScript.m
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "NSMutableString+JavaScript.h"
31
+
32
+ @implementation NSMutableString (JavaScript)
33
+
34
+ - (S*(^)(NSS* value))append
35
+ {
36
+ return ^(NSS* value) {
37
+ [self appendString:value];
38
+ return self;
39
+ };
40
+ }
41
+
42
+ @end
@@ -0,0 +1,36 @@
1
+ //
2
+ // NSNumber+JavaScript.h
3
+ // SubjectiveScript.m
4
+ //
5
+ // Created by Kevin Malakoff on 7/29/12.
6
+ // Copyright (c) 2012 Kevin Malakoff. All rights reserved.
7
+ //
8
+ // Permission is hereby granted, free of charge, to any person
9
+ // obtaining a copy of this software and associated documentation
10
+ // files (the "Software"), to deal in the Software without
11
+ // restriction, including without limitation the rights to use,
12
+ // copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ // copies of the Software, and to permit persons to whom the
14
+ // Software is furnished to do so, subject to the following
15
+ // conditions:
16
+ //
17
+ // The above copyright notice and this permission notice shall be
18
+ // included in all copies or substantial portions of the Software.
19
+ //
20
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
+ // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22
+ // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
+ // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24
+ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25
+ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27
+ // OTHER DEALINGS IN THE SOFTWARE.
28
+ //
29
+
30
+ #import "SSTypes.h"
31
+
32
+ @interface NSNumber (JavaScript)
33
+
34
+ - (NSS*(^)())toString;
35
+
36
+ @end