Class: Lita::Handlers::Room

Inherits:
Object
  • Object
show all
Extended by:
Handler::ChatRouter
Defined in:
lib/lita/handlers/room.rb

Overview

Allows administrators to make Lita join and part from rooms.

Since:

  • 3.0.0

Instance Method Summary collapse

Instance Method Details

#join(response) ⇒ void

This method returns an undefined value.

Joins the room with the specified ID.

Parameters:

  • response (Response)

    The response object.

Since:

  • 3.0.0



20
21
22
# File 'lib/lita/handlers/room.rb', line 20

def join(response)
  robot.join(response.args[0])
end

#part(response) ⇒ void

This method returns an undefined value.

Parts from the room with the specified ID.

Parameters:

  • response (Response)

    The response object.

Since:

  • 3.0.0



27
28
29
# File 'lib/lita/handlers/room.rb', line 27

def part(response)
  robot.part(response.args[0])
end