Class: Rage::Ext::ActiveRecord::ConnectionPool::BlackHoleList

Inherits:
Object
  • Object
show all
Defined in:
lib/rage/ext/active_record/connection_pool.rb

Overview

items can be added but not removed

Instance Method Summary collapse

Constructor Details

#initialize(arr) ⇒ BlackHoleList

Returns a new instance of BlackHoleList.



6
7
8
# File 'lib/rage/ext/active_record/connection_pool.rb', line 6

def initialize(arr)
  @arr = arr
end

Instance Method Details

#<<(el) ⇒ Object



10
11
12
# File 'lib/rage/ext/active_record/connection_pool.rb', line 10

def <<(el)
  @arr << el
end

#lengthObject



18
19
20
# File 'lib/rage/ext/active_record/connection_pool.rb', line 18

def length
  0
end

#shiftObject



14
15
16
# File 'lib/rage/ext/active_record/connection_pool.rb', line 14

def shift
  nil
end

#to_aObject



22
23
24
# File 'lib/rage/ext/active_record/connection_pool.rb', line 22

def to_a
  @arr
end