def attr_event(*names)
      args = (names[-1].is_a? Hash) ? names.pop : {}
      names.each {|n| define_event(n, args) }
      return nil
    end
def attr_event(*names)
      args = (names[-1].is_a? Hash) ? names.pop : {}
      names.each {|n| define_event(n, args) }
      return nil
    end
This helper method is similar to attr_reader and attr_accessor.  It allows
 for instance events to be declared inside the body of the class.