Class: Raheui::Stack

Inherits:
Store
  • Object
show all
Defined in:
lib/raheui/stack.rb

Overview

Stack class for Aheui.

Instance Method Summary collapse

Methods inherited from Store

#initialize, #push_dup

Constructor Details

This class inherits a constructor from Raheui::Store

Instance Method Details

#swapObject

Swap the last two elements of Stack.



10
11
12
# File 'lib/raheui/stack.rb', line 10

def swap
  @store[-1], @store[-2] = @store[-2], @store[-1] if size > 1
end