Skip to content

Commit

Permalink
Add proxy for getOption to application.
Browse files Browse the repository at this point in the history
  • Loading branch information
samccone committed Jul 12, 2014
1 parent 0e9f266 commit 9abb5eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/marionette.application.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var MyApp = new Backbone.Marionette.Application();
* [Overriding the default RegionManager](#overriding-the-default-regionmanager)
* [Get Region By Name](#get-region-by-name)
* [Removing Regions](#removing-regions)
* [Application.getOption](#applicationgetoption)

## Adding Initializers

Expand Down Expand Up @@ -324,3 +325,8 @@ application object.
For more information on regions, see [the region documentation](./marionette.region.md) Also, the API that Applications use to
manage regions comes from the RegionManager Class, which is documented [over here](https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.regionmanager.md).
### Application.getOption
Retrieve an object's attribute either directly from the object, or from the object's this.options, with this.options taking precedence.
More information [getOption](./marionette.functions.md)
5 changes: 4 additions & 1 deletion src/marionette.application.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ _.extend(Marionette.Application.prototype, Backbone.Events, {

// import the `triggerMethod` to trigger events with corresponding
// methods if the method exists
triggerMethod: Marionette.triggerMethod
triggerMethod: Marionette.triggerMethod,

// Proxy `getOption` to enable getting options from this or this.options by name.
getOption: Marionette.proxyGetOption
});

// Copy the `extend` function used by Backbone's classes
Expand Down

0 comments on commit 9abb5eb

Please sign in to comment.