CoreObject.metaForProperty()

metaForProperty (key) privatestatic Defined in packages/ember-runtime/lib/system/core_object.js:792 In some cases, you may want to annotate computed properties with additional metadata about how they function or what values they operate on. For example, computed property functions may close over variables that are then no longer available for introspection. You can pass a hash of these values to a computed property like this: person: function() { var personId = this.get('personId'); ret

CoreObject.extend()

extend (mixins, arguments) publicstatic Defined in packages/ember-runtime/lib/system/core_object.js:527 Creates a new subclass. App.Person = Ember.Object.extend({ say: function(thing) { alert(thing); } }); This defines a new subclass of Ember.Object: App.Person. It contains one method: say(). You can also create a subclass from any existing class by calling its extend() method. For example, you might want to create a subclass of Ember's built-in Ember.View class: App.PersonView =

CoreObject.eachComputedProperty()

eachComputedProperty (callback, binding) privatestatic Defined in packages/ember-runtime/lib/system/core_object.js:853 Iterate over each computed property for the class, passing its name and any associated metadata (see metaForProperty) to the callback. Parameters: callback Function binding Object

CoreObject.create()

create (arguments) publicstatic Defined in packages/ember-runtime/lib/system/core_object.js:635 Creates an instance of a class. Accepts either no arguments, or an object containing values to initialize the newly instantiated object with. App.Person = Ember.Object.extend({ helloWorld: function() { alert("Hi, my name is " + this.get('name')); } }); var tom = App.Person.create({ name: 'Tom Dale' }); tom.helloWorld(); // alerts "Hi, my name is Tom Dale". create will call the init f

CoreObject#_scheduledDestroy()

_scheduledDestroyprivate Defined in packages/ember-runtime/lib/system/core_object.js:448 Invoked by the run loop to actually destroy the object. This is scheduled for execution by the destroy method.

CoreObject#_onLookup()

_onLookupprivate Defined in packages/ember-runtime/lib/system/core_object.js:881 Provides lookup-time type validation for injected properties.

CoreObject#_lazyInjections()

_lazyInjectionsObjectprivate Defined in packages/ember-runtime/lib/system/core_object.js:890 Returns a hash of property names and container names that injected properties will lookup on the container lazily. Returns: Object Hash of all lazy injected property keys to container names

CoreObject#willDestroy()

willDestroypublic Defined in packages/ember-runtime/lib/system/core_object.js:440 Override to implement teardown.

CoreObject#toString()

toStringStringpublic Defined in packages/ember-runtime/lib/system/core_object.js:467 Returns a string representation which attempts to provide more information than Javascript's toString typically does, in a generic way for all Ember objects. App.Person = Em.Object.extend() person = App.Person.create() person.toString() //=> "<App.Person:ember1024>" If the object's class is not defined on an Ember namespace, it will indicate it is a subclass of the registered superclass: Student =

CoreObject#reopenClass()

reopenClasspublic Defined in packages/ember-runtime/lib/system/core_object.js:717 Augments a constructor's own properties and functions: MyObject = Ember.Object.extend({ name: 'an object' }); MyObject.reopenClass({ canBuild: false }); MyObject.canBuild; // false o = MyObject.create(); In other words, this creates static properties and functions for the class. These are only available on the class and not on any instance of that class. App.Person = Ember.Object.extend({ name : "",