title: Required properties (constructor args) in Ember.Object instances
body: <p>In Ember, let's say I have an object called <code>FoodStuff</code> that has a few properties:</p>
  
  <pre><code>export default Ember.Object.extend({
      name: null,     // REQUIRED: 'Slice of Apple Pie'
      calories: null, // OPTIONAL: int: eg. 250
      category: null, // REQUIRED: 'Pastry'
      rating: null    // OPTIONAL: int: 1-5
  });
  </code></pre>
  
  <p>How can I write a 'constructor' in Ember, requiring that the 'name' and 'category' properties be provided at instantiation-time?</p>
  
  <p>Angular seems to approach this with fairly straightforward syntax:</p>
  
  <pre><code>.factory('User', function (Organisation) {
  
    /**
     * Constructor, with class name
     */
    function User(firstName, lastName, role, organisation) {
      // Public properties, assigned to the instance ('this')
      this.firstName = firstName;
      ...
  </code></pre>
  
  <p><a href="https://medium.com/opinionated-angularjs/angular-model-objects-with-javascript-classes-2e6a067c73bc">Angular model objects with JavaScript classes</a></p>
  
  <p>Does Ember have something similar? Currently all my classes are as seen at the top, with a bunch of initially null properties that <em>might or might not</em> be properly set by the caller. At build time (I'm using <code>ember-cli</code>) I would like for changes in constructor requirements to be caught downstream by the <code>ember build</code> phase with JSHint.</p>