Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 83 lines (78 sloc) 2.958 kb
299d3b1 @groue v1.12.0
authored
1 // The MIT License
2 //
3 // Copyright (c) 2012 Gwendal Roué
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22
23 #import <Foundation/Foundation.h>
24 #import "GRMustacheAvailabilityMacros.h"
25
0d322bc @groue v4.1.1
authored
26 /**
27 * The GRMustacheInvocation class gives you information about the values that
28 * are found in the context stack when rendering tags such as `{{name}}`.
29 *
30 * You'll be given GRMustacheInvocation instances when providing a
31 * GRMustacheTemplateDelegate to your templates.
32 *
33 * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/delegate.md
34 *
35 * @see GRMustacheTemplateDelegate
36 *
37 * @since v1.12
38 */
299d3b1 @groue v1.12.0
authored
39 @interface GRMustacheInvocation : NSObject {
40 @private
a3a88b4 @groue v4.3.0
authored
41 NSString *_key;
299d3b1 @groue v1.12.0
authored
42 id _returnValue;
a3a88b4 @groue v4.3.0
authored
43 id _debuggingToken;
299d3b1 @groue v1.12.0
authored
44 }
0d322bc @groue v4.1.1
authored
45
46 /**
47 * The key that did provide the return value of the invocation.
48 *
49 * For instance, the invocation that you would get for a `{{name}}` tag would
50 * have @"name" in its `key` property, and the name in the `returnValue`
51 * property.
52 *
53 * For tags with compound keys, such as `{{person.name}}`, the key will be
54 * @"name" if the person could be found in the context stack. It would be
55 * @"person" otherwise.
56 *
57 * @see returnValue
58 *
59 * @since v1.12
60 */
6337526 @groue v4.0.0
authored
61 @property (nonatomic, readonly) NSString *key AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
0d322bc @groue v4.1.1
authored
62
63 /**
64 * The return value of the invocation.
65 *
66 * For instance, the invocation that you would get for a `{{name}}` tag would
67 * have the name in the `returnValue` property.
68 *
69 * For tags with compound keys, such as `{{person.name}}`, the value will be
70 * the person's name, if the person could be found in the context stack.
71 * It would be nil otherwise.
72 *
73 * In a template's delegate methods, you can set the returnValue of an
74 * invocation, and alter a template rendering.
75 *
76 * @see key
77 * @see GRMustacheTemplateDelegate
78 *
79 * @since v1.12
80 */
6337526 @groue v4.0.0
authored
81 @property (nonatomic, retain) id returnValue AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
299d3b1 @groue v1.12.0
authored
82 @end
Something went wrong with that request. Please try again.