Sha256: 337560507774d5cc33d22883319d4679f8d7d62f9cadcd9da6f7edc8231d68ab

Contents?: true

Size: 716 Bytes

Versions: 28

Compression:

Stored size: 716 Bytes

Contents

module GorgonBunny
  # Helper methods necessary to stay mostly backwards-compatible with legacy (0.7.x, 0.8.x) GorgonBunny
  # releases that hide channels completely from the API.
  #
  # @private
  module Compatibility

    #
    # API
    #

    # @private
    def channel_from(channel_or_connection)
      # GorgonBunny 0.8.x and earlier completely hide channels from the API. So, queues and exchanges are
      # instantiated with a "GorgonBunny object", which is a session. This function coerces two types of input to a
      # channel.
      if channel_or_connection.is_a?(GorgonBunny::Session)
        channel_or_connection.default_channel
      else
        channel_or_connection
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
gorgon-0.11.1 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.11.0 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.10.5 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.10.4 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.10.3 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.10.2 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.10.1 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.10.0 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.9.0 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.8.4 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.8.3 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.8.2 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.8.1 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.8.0 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.7.1 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.7.0 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.7.0.rc4 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.7.0.rc3 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.7.0.rc2 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb
gorgon-0.7.0.rc1 lib/gorgon_bunny/lib/gorgon_bunny/compatibility.rb