Skip to content

Commit 8bb833d

Browse files
committed
Merge pull request #3165 from grschafer/master
Fix constructor_destructuring docs example to alert a defined value
2 parents 2b03fa9 + 26c0f7c commit 8bb833d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

documentation/coffee/constructor_destructuring.coffee

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ class Person
22
constructor: (options) ->
33
{@name, @age, @height} = options
44

5+
tim = new Person age: 4
6+

documentation/index.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ Expressions
805805
Destructuring assignment is also useful when combined with class constructors
806806
to assign properties to your instance from an options object passed to the constructor.
807807
</p>
808-
<%= code_for('constructor_destructuring', 'contents.join("")') %>
808+
<%= code_for('constructor_destructuring', 'tim.age') %>
809809

810810
<p>
811811
<span id="fat-arrow" class="bookmark"></span>

documentation/js/constructor_destructuring.js

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)