class Eye::Utils::Tail
Public Class Methods
new(max_size = 100)
click to toggle source
limited array
Calls superclass method
# File lib/eye/utils/tail.rb, line 5 def initialize(max_size = 100) @max_size = max_size super() end
Public Instance Methods
<<(el)
click to toggle source
# File lib/eye/utils/tail.rb, line 16 def <<(el) push(el) end
push(el)
click to toggle source
Calls superclass method
# File lib/eye/utils/tail.rb, line 10 def push(el) super(el) shift if length > @max_size self end