lib/mushroom/subscriber.rb
# Public: Setter and getter for events
#
# Can be called multiple times to set events on a Subscriber.
#
# Events cannot be inherited by subclassed objects.
#
# Example:
#   class Handler < Mushroom::Subscriber
#     events :start, :on => Server
#     events :stop, :on => [Server, Time]
#     events :register, :activate, :on => [User]
#   end
#
# Returns: Array of current event registrations.
Setter and getter for events
Can be called multiple times to set events on a Subscriber.

Events cannot be inherited by subclassed objects.



Array of current event registrations.
Setter and getter for events Can be called multiple times to set events on a Subscriber . Events cannot be inherited by subclassed objects . Array of current event registrations .
def events(*events_and_options)
        if events_and_options.empty?
          self._events
        else
          create_event_subscription(*events_and_options)
        end
      end
def events ( * events_and_options ) if events_and_options . empty? self . _events else create_event_subscription ( * events_and_options ) end end
Public: Setter and getter for events
Can be called multiple times to set events on a Subscriber.
Public : Setter and getter for events Can be called multiple times to set events on a Subscriber .
events_and_options
<not_specific>