Class: InOrder::Stack

Inherits:
Queue
  • Object
show all
Defined in:
app/models/in_order/stack.rb

Instance Method Summary collapse

Methods inherited from Queue

#call, #join, #peek, #size, #trim

Methods included from Aux::VarKeys

included, #initialize

Instance Method Details

#push(record, max = nil) ⇒ Object



5
6
7
# File 'app/models/in_order/stack.rb', line 5

def push(record, max=nil)
  adder.append(record).tap { trim(max) if max }
end