Sha256: 2ac5a5b54d51dee7f74330b98930231a4270d51b9aa1ba5e022a6ad7c876895e

Contents?: true

Size: 469 Bytes

Versions: 11

Compression:

Stored size: 469 Bytes

Contents

module Queuel
  module IronMq
    class Message < Base::Message
      def raw_body
        @raw_body ||
          (message_object && message_object.body) ||
          encoded_body
      end

      def delete
        message_object.delete
      end

      [:id, :queue].each do |delegate|
        define_method(delegate) do
          instance_variable_get("@#{delegate}") || message_object && message_object.public_send(delegate)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
queuel-0.4.8 lib/queuel/iron_mq/message.rb
queuel-0.4.6 lib/queuel/iron_mq/message.rb
queuel-0.4.5 lib/queuel/iron_mq/message.rb
queuel-0.4.4 lib/queuel/iron_mq/message.rb
queuel-0.4.3 lib/queuel/iron_mq/message.rb
queuel-0.4.2 lib/queuel/iron_mq/message.rb
queuel-0.4.1 lib/queuel/iron_mq/message.rb
queuel-0.4.0 lib/queuel/iron_mq/message.rb
queuel-0.3.1 lib/queuel/iron_mq/message.rb
queuel-0.3.0 lib/queuel/iron_mq/message.rb
queuel-0.2.0 lib/queuel/iron_mq/message.rb