lib/isimud/event.rb
def as_json(options = {})
      session_id = parameters.delete(:session_id) || Thread.current[:keas_session_id]

      data = {type:          type,
              action:        action,
              user_id:       user_id,
              occurred_at:   occurred_at,
              eventful_type: eventful_type,
              eventful_id:   eventful_id,
              session_id:    session_id}
      unless options[:omit_parameters]
        data[:parameters] = parameters
        data[:attributes] = attributes
      end
      data
    end
def as_json(options = {})
      session_id = parameters.delete(:session_id) || Thread.current[:keas_session_id]

      data = {type:          type,
              action:        action,
              user_id:       user_id,
              occurred_at:   occurred_at,
              eventful_type: eventful_type,
              eventful_id:   eventful_id,
              session_id:    session_id}
      unless options[:omit_parameters]
        data[:parameters] = parameters
        data[:attributes] = attributes
      end
      data
    end
def as_json ( options = { } ) session_id = parameters . delete ( :session_id ) || Thread . current [ :keas_session_id ] data = { type : type , action : action , user_id : user_id , occurred_at : occurred_at , eventful_type : eventful_type , eventful_id : eventful_id , session_id : session_id } unless options [ :omit_parameters ] data [ :parameters ] = parameters data [ :attributes ] = attributes end data end
Return hash of data to be serialized to JSON
 @option options [Boolean] :omit_parameters when set, do not include attributes or parameters in data
 @return [Hash] data to serialize
Return hash of data to be serialized to JSON