lib/lita/adapter.rb in lita-4.5.0 vs lib/lita/adapter.rb in lita-4.6.0
- old
+ new
@@ -2,10 +2,11 @@
# Adapters are the glue between Lita's API and a chat service.
class Adapter
# The names of methods that should be implemented by an adapter.
# @since 4.4.0
REQUIRED_METHODS = %i(
+ chat_service
join
part
roster
run
send_messages
@@ -62,9 +63,15 @@
# @return [Lita::Configuration] The adapter's configuration object.
# @since 4.0.0
def config
robot.config.adapters.public_send(self.class.namespace)
end
+
+ # @!method chat_service
+ # May return an object exposing chat-service-specific APIs.
+ # @return [Object, nil] The chat service API object, if any.
+ # @abstract This should be implemented by the adapter.
+ # @since 4.6.0
# @!method join(room_id)
# Joins the room with the specified ID.
# @param room_id [String] The ID of the room.
# @return [void]