Sha256: 0a163a17a8cf37ed81381af1684571850cade2c0abca7fdba3af29ed2c1afdd5

Contents?: true

Size: 422 Bytes

Versions: 3

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literal: true

module Del
  class SendMessage
    def initialize(shell, socket_file:)
      @shell = shell
      @socket = SocketMessage.new(@shell, socket_file: socket_file)
    end

    def run(jid, message)
      @socket.deliver(
        command: :send_message,
        jid: jid,
        message: message
      )
      @shell.say(@socket.listen, :green)
    ensure
      @socket.close
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
del-0.1.19 lib/del/send_message.rb
del-0.1.18 lib/del/send_message.rb
del-0.1.17 lib/del/send_message.rb