Skip to content

Commit

Permalink
Updating README.
Browse files Browse the repository at this point in the history
  • Loading branch information
markfinger committed Jun 18, 2012
1 parent d8a9d36 commit cd4a49f
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ Publish
Publish a message to any subscribers who are listening for that specific Publish a message to any subscribers who are listening for that specific
message. message.


- ``message`` - a string identifying the event to publish. ``message`` a string identifying the event to publish.
- ``data`` - an optional variable to pass to each subscriber's callback.
``data`` an optional variable to pass to each subscriber's callback.


-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Subscribe Subscribe
Expand All @@ -58,17 +59,19 @@ Subscribe
Subscribe to events concerning a specific message. When the event occurs the Subscribe to events concerning a specific message. When the event occurs the
provided function will be called. provided function will be called.


- ``message`` - a string identifying the event to listen for. ``message`` a string identifying the event to listen for.
- ``callback`` - a function which will receive a `Signal Objects`_.
- ``thisArg`` - an optional argument which will be assigned as the ``this`` ``callback`` a function which will receive a `Signal Objects`_.
object for ``callback``.
``thisArg`` an optional argument which will be assigned as the ``this`` object for ``callback``.


-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Unsubscribe Unsubscribe
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------


// fc.unsubscribe(message) ``fc.unsubscribe(message)``
// Remove any subscriber listening for :message.
Removes any subscribers listening for a specific message.


-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Message Syntax Message Syntax
Expand All @@ -85,5 +88,7 @@ Signal Objects
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Registry Registry
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
// fc.registry() ``fc.registry()``
// Returns an associative array containing all subscribers.
Returns an associative array containing all subscribers. Subscribers are grouped
by the message they are listening for.

0 comments on commit cd4a49f

Please sign in to comment.