Class: InOrder::Stack
Instance Method Summary collapse
Methods inherited from Queue
#call, #join, #peek, #size, #trim
Methods included from Aux::VarKeys
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 |