Class: Rage::Ext::ActiveRecord::ConnectionPool::BlackHoleList
- Inherits:
-
Object
- Object
- Rage::Ext::ActiveRecord::ConnectionPool::BlackHoleList
- Defined in:
- lib/rage/ext/active_record/connection_pool.rb
Overview
items can be added but not removed
Instance Method Summary collapse
- #<<(el) ⇒ Object
-
#initialize(arr) ⇒ BlackHoleList
constructor
A new instance of BlackHoleList.
- #length ⇒ Object
- #pop ⇒ Object
- #to_a ⇒ Object
- #unshift(el) ⇒ Object
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 |
#length ⇒ Object
22 23 24 |
# File 'lib/rage/ext/active_record/connection_pool.rb', line 22 def length 0 end |
#pop ⇒ Object
18 19 20 |
# File 'lib/rage/ext/active_record/connection_pool.rb', line 18 def pop nil end |
#to_a ⇒ Object
26 27 28 |
# File 'lib/rage/ext/active_record/connection_pool.rb', line 26 def to_a @arr end |
#unshift(el) ⇒ Object
14 15 16 |
# File 'lib/rage/ext/active_record/connection_pool.rb', line 14 def unshift(el) @arr.unshift(el) end |