Sha256: 00c154addb407f3460f1d6a7d08639a38405988e709e5751ad73e52359009303

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

module Hipbot
  module Callbacks
    class RoomTopic < Message
      def initialize room_id, topic
        with_room(id: room_id) do |room|
          Hipbot.logger.info("TOPIC in ##{room}: #{topic}")
          update_topic(room, topic)
        end
      end

      protected

      def update_topic room, topic
        room.update_attribute(:topic, topic)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hipbot-1.0.4 lib/hipbot/callbacks/room_topic.rb