Sha256: 6aaef98eb8e1f33799005f1cd603cb6f8f8d89a50d4f2dbfd3e34a3c1726c958

Contents?: true

Size: 433 Bytes

Versions: 17

Compression:

Stored size: 433 Bytes

Contents

module Hermes
  class Publisher::InMemoryAdapter
    attr_reader :store

    def self.connect
    end

    def initialize
      @store = []
    end

    def publish(routing_key, payload, properties = {}, options = {})
      message = { routing_key: routing_key, payload: payload }
      message[:properties] = properties if properties.any?
      message[:options] = options if options.any?

      @store << message
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
hermes-rb-0.9.1 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.9.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.8.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.7.5 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.7.4 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.7.3 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.7.2 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.7.1 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.7.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.6.1 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.6.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.5.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.4.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.3.1 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.3.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.2.0 lib/hermes/publisher/in_memory_adapter.rb
hermes-rb-0.1.0 lib/hermes/publisher/in_memory_adapter.rb