Sha256: 14b845dcb64ae1154bedc7c64c624afd91b97a2b05ba0b6fac934052ceae82e5
Contents?: true
Size: 502 Bytes
Versions: 38
Compression:
Stored size: 502 Bytes
Contents
# This class represents a messages stack class Docker::MessagesStack attr_accessor :messages # Initialize stack with optional size # # @param size [Integer] def initialize(size = -1) @messages = [] @size = size end # Append messages to stack # # @param messages [Docker::Messages] def append(messages) return if @size == 0 messages.all_messages.each do |msg| @messages << msg @messages.shift if @size > -1 && @messages.size > @size end end end
Version data entries
38 entries across 38 versions & 1 rubygems