Skip to content

Commit

Permalink
v1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Sep 17, 2011
1 parent 6c88f6a commit 8059b38
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 279 deletions.
2 changes: 1 addition & 1 deletion Classes/GRMustacheVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
@since v1.0.0
*/
#define GRMUSTACHE_PATCH_VERSION 2
#define GRMUSTACHE_PATCH_VERSION 3

4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
GRMustache Release Notes
========================

## v1.7.3

One no longer needs to add `-all_load` to the "Other Linker Flags" target option tu use GRMustache static libraries.

## v1.7.2

- Fixed [issue #6](https://github.com/groue/GRMustache/issues/6)
Expand Down
77 changes: 70 additions & 7 deletions include/GRMustache.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,83 @@

#import <Foundation/Foundation.h>

/**
A C struct that hold GRMustache version information
@since v1.0.0
*/
typedef struct {
int major; /**< The major component of the version. */
int minor; /**< The minor component of the version. */
int patch; /**< The patch-level component of the version. */
} GRMustacheVersion;


/**
The GRMustache class provides with global-level information and configuration
of the GRMustache library.
@since v1.0.0
*/
@interface GRMustache: NSObject

//////////////////////////////////////////////////////////////////////////////////////////
/// @name Getting the GRMustache version
//////////////////////////////////////////////////////////////////////////////////////////

/**
@returns the version of GRMustache as a GRMustacheVersion.
@since v1.0.0
*/
+ (GRMustacheVersion)version;

//////////////////////////////////////////////////////////////////////////////////////////
/// @name Handling of boolean properties
//////////////////////////////////////////////////////////////////////////////////////////

/**
A Boolean value that determines whether GRMustache renders templates in strict
boolean mode.
@returns YES if GRMustache renders templates in strict boolean mode,
NO otherwise. The default value is NO.
In strict boolean mode, properties of context objects that are declared as BOOL
are interpreted as numbers, and can not be used for controlling Mustache
boolean sections.
In non-strict boolean mode, all properties declared as signed char (including
those declared as BOOL), are interpreted as booleans, and can be used for
controlling Mustache boolean sections.
@see GRMustache#setStrictBooleanMode:
@see GRYes
@see GRNo
@since v1.0.0
*/
+ (BOOL)strictBooleanMode;

/**
Sets the strict boolean mode of GMustache.
@param aBool YES if GRMustache should render templates in strict boolean mode,
NO otherwise.
@see GRMustache#strictBooleanMode
@since v1.0.0
*/
+ (void)setStrictBooleanMode:(BOOL)aBool;

+ (void)preventNSUndefinedKeyExceptionAttack;

@end

#import "GRMustacheVersion.h"
#import "GRMustacheConfiguration.h"
#import "GRBoolean.h"
#import "GRMustacheError.h"
#import "GRMustacheRendering.h"
#import "GRMustacheSection.h"
#import "GRMustacheTemplate.h"
#import "GRMustacheTemplateLoader.h"
#import "GRMustacheContext.h"
#import "GRMustacheLambda.h"
#import "GRMustacheTemplateLoader.h"
#import "GRMustacheTemplate.h"
#import "GRBoolean.h"
#import "GRMustacheEnvironment.h"
#import "GRMustacheError.h"
#import "GRMustacheVersion.h"
69 changes: 0 additions & 69 deletions include/GRMustacheConfiguration.h

This file was deleted.

2 changes: 2 additions & 0 deletions include/GRMustacheContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <Foundation/Foundation.h>


@interface GRMustacheContext: NSObject {
@private
Expand Down
4 changes: 2 additions & 2 deletions include/GRMustacheLambda.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <Foundation/Foundation.h>
#import "GRMustacheEnvironment.h"
#import "GRMustacheSection.h"

@class GRMustacheSection;
@class GRMustacheContext;

#if GRMUSTACHE_BLOCKS_AVAILABLE
Expand Down
167 changes: 0 additions & 167 deletions include/GRMustacheRendering.h

This file was deleted.

21 changes: 21 additions & 0 deletions include/GRMustacheSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,25 @@
NSArray *elems;
}
@property (nonatomic, readonly) NSString *templateString;

/**
Renders a template with a context object.
@returns A string containing the rendered template
@param object A context object used for interpreting Mustache tags
@since v1.3.0
*/
- (NSString *)renderObject:(id)object;

/**
Renders a template with context objects.
@returns A string containing the rendered template
@param object, ... A comma-separated list of objects used for interpreting Mustache tags, ending with nil
@since v1.5.0
*/
- (NSString *)renderObjects:(id)object, ...;

@end
Loading

0 comments on commit 8059b38

Please sign in to comment.