Class: Rubirai::RequestEvent Abstract

Inherits:
Event
  • Object
show all
Defined in:
lib/rubirai/events/request_events.rb,
lib/rubirai/event_resp.rb

Overview

This class is abstract.

Request events

Instance Attribute Summary collapse

Attributes inherited from Event

#bot, #raw

Instance Method Summary collapse

Methods inherited from Event

parse, #parse_val_from_key, set_event, type_to_klass, valid_type?

Instance Attribute Details

#event_idInteger (readonly)

Returns the event id.

Returns:

  • (Integer)

    the event id



19
# File 'lib/rubirai/events/request_events.rb', line 19

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#from_idInteger (readonly)

Returns the id of the sender of the request.

Returns:

  • (Integer)

    the id of the sender of the request



19
# File 'lib/rubirai/events/request_events.rb', line 19

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#group_idInteger (readonly)

Returns the group where the request is from. 0 if not from group.

Returns:

  • (Integer)

    the group where the request is from. 0 if not from group



19
# File 'lib/rubirai/events/request_events.rb', line 19

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#messageString (readonly)

Returns the message from the sender.

Returns:

  • (String)

    the message from the sender



19
# File 'lib/rubirai/events/request_events.rb', line 19

set_event nil, :event_id, :from_id, :group_id, :nick, :message

#nickString (readonly)

Returns the nickname of the sender of the request.

Returns:

  • (String)

    the nickname of the sender of the request



19
# File 'lib/rubirai/events/request_events.rb', line 19

set_event nil, :event_id, :from_id, :group_id, :nick, :message

Instance Method Details

#respond(operation, message) ⇒ Object

This method is abstract.

Raises:

  • (NotImplementedError)


112
113
114
# File 'lib/rubirai/event_resp.rb', line 112

def respond(operation, message)
  raise NotImplementedError
end