Permalink
Browse files

Improve documentation for subscribe block

  • Loading branch information...
Grant Hutchins & Sabrina Staedt
Grant Hutchins & Sabrina Staedt committed Sep 27, 2012
1 parent 46f0fc6 commit 5917c6eb285b0327ab340ee2933db88d5f5ba3bd
Showing with 11 additions and 1 deletion.
  1. +11 −1 activesupport/lib/active_support/notifications.rb
@@ -25,7 +25,17 @@ module ActiveSupport
# == Subscribers
#
# You can consume those events and the information they provide by registering
- # a subscriber. For instance, let's store all "render" events in an array:
+ # a subscriber.
+ #
+ # ActiveSupport::Notifications.subscribe('render') do |name, start, finish, id, payload|
+ # name # => String, name of the event (such as 'render' from above)
+ # start # => Time, when the instrumented block started execution
+ # finish # => Time, when the instrumented block ended execution
+ # id # => String, unique ID for this notification
+ # payload # => Hash, the payload
+ # end
+ #
+ # For instance, let's store all "render" events in an array:
#
# events = []
#

0 comments on commit 5917c6e

Please sign in to comment.