Added clarification note about sending messages.

This commit is contained in:
Jim Weirich
2013-11-13 23:13:26 -05:00
parent 6622cf0d99
commit 174defbd1a
2 changed files with 7 additions and 0 deletions

Binary file not shown.

View File

@@ -63,6 +63,13 @@ class AboutMessagePassing < Neo::Koan
assert_equal __([3, 4, nil, 6]), mc.send(:add_a_payload, 3, 4, nil, 6)
end
# NOTE:
#
# Both obj.msg and obj.send(:msg) sends the message named :msg to
# the object. We use "send" when the name of the message can vary
# dynamically (e.g. calculated at run time), but by far the most
# common way of sending a message is just to say: obj.msg.
# ------------------------------------------------------------------
class TypicalObject