Sha256: e3d8aaeeda3697453335e1d9fd8d471a6a3b49e4413f3dbd93ca8fd2a525eebb

Contents?: true

Size: 479 Bytes

Versions: 13

Compression:

Stored size: 479 Bytes

Contents

class DripDrop
  class BaseHandler
    
    private
    # Normalize Hash objs and DripDrop::Message objs into DripDrop::Message objs
    def dd_messagify(message)
      if message.is_a?(Hash)
        return DripDrop::Message.new(message[:name], :head => message[:head],
                                                     :body => message[:body])
      elsif message.is_a?(DripDrop::Message)
        return message
      else
        return message
      end
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dripdrop-0.9.6 lib/dripdrop/handlers/base.rb
dripdrop-0.9.5 lib/dripdrop/handlers/base.rb
dripdrop-0.9.4 lib/dripdrop/handlers/base.rb
dripdrop-0.9.3 lib/dripdrop/handlers/base.rb
dripdrop-0.9.2 lib/dripdrop/handlers/base.rb
dripdrop-0.8.1 lib/dripdrop/handlers/base.rb
dripdrop-0.8.0 lib/dripdrop/handlers/base.rb
dripdrop-0.7.1 lib/dripdrop/handlers/base.rb
dripdrop-0.6.0 lib/dripdrop/handlers/base.rb
dripdrop-0.5.0 lib/dripdrop/handlers/base.rb
dripdrop-0.4.2 lib/dripdrop/handlers/base.rb
dripdrop-0.4.1 lib/dripdrop/handlers/base.rb
dripdrop-0.4.0 lib/dripdrop/handlers/base.rb