Class: HashBuffer

Inherits:
Array
  • Object
show all
Defined in:
lib/active_event/support/hash_buffer.rb

Overview

a hash with limited size

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_size, *args, &block) ⇒ HashBuffer

Returns a new instance of HashBuffer.



5
6
7
8
# File 'lib/active_event/support/hash_buffer.rb', line 5

def initialize(max_size, *args, &block)
  super(*args, &block)
  self.max_size = max_size
end

Instance Attribute Details

#max_sizeObject

Returns the value of attribute max_size.



3
4
5
# File 'lib/active_event/support/hash_buffer.rb', line 3

def max_size
  @max_size
end