lib/rails/graphql/helpers/with_events.rb
# Set or get the list of possible event types when attaching events
Set or get the list of possible event types when attaching events
Set or get the list of possible event types when attaching events
def event_types(*list, append: false, expose: false)
            return (defined?(@event_types) && @event_types.presence) ||
              superclass.try(:event_types) || [] if list.blank?
            new_list = append ? event_types : []
            new_list += list.flatten.compact.map(&:to_sym)
            @event_types = new_list.uniq.freeze
            expose_events!(*list) if expose
            @event_types
          end
def event_types ( * list , append : false , expose : false ) return ( defined? ( @event_types ) && @event_types . presence ) || superclass . try ( :event_types ) || [ ] if list . blank? new_list = append ? event_types : [ ] new_list += list . flatten . compact . map ( & :to_sym ) @event_types = new_list . uniq . freeze expose_events! ( * list ) if expose @event_types end
Set or get the list of possible event types when attaching events
Set or get the list of possible event types when attaching events
list
append
expose