Sha256: 1f02b6cdd7349418e8a0f455ddc3a91b53a8873cb7860088b44c9d49bb6f7d81

Contents?: true

Size: 466 Bytes

Versions: 12

Compression:

Stored size: 466 Bytes

Contents

module Conveyor
  module Output
    class Channel
      include Singleton

      def initialize
      end

      def write(name, msgtype, *msg)
        @channel = Conveyor::Foreman.instance.channel
        return false if @channel.nil?

        options = msg.extract_options!
        format = '[%s] [%s::%s] %s'

        Array.new(msg).each do |m|
          @channel.push [msgtype, sprintf(format, Time.now, name, msgtype, m)]
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gina-conveyor-1.0.1 lib/conveyor/output/channel.rb
gina-conveyor-1.0.0 lib/conveyor/output/channel.rb
gina-conveyor-0.2.4 lib/conveyor/output/channel.rb
gina-conveyor-0.2.3 lib/conveyor/output/channel.rb
gina-conveyor-0.2.2 lib/conveyor/output/channel.rb
gina-conveyor-0.2.1 lib/conveyor/output/channel.rb
gina-conveyor-0.2.0 lib/conveyor/output/channel.rb
gina-conveyor-0.1.3 lib/conveyor/output/channel.rb
gina-conveyor-0.1.2 lib/conveyor/output/channel.rb
gina-conveyor-0.1.1 lib/conveyor/output/channel.rb
gina-conveyor-0.1.0 lib/conveyor/output/channel.rb
gina-conveyor-0.0.2 lib/conveyor/output/channel.rb