Created
          November 27, 2009 00:53 
        
      - 
      
- 
        Save hooopo/243753 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Stack | |
| def initialize | |
| @store = [] | |
| end | |
| def push(x) | |
| @store.push x | |
| end | |
| def pop | |
| @store.pop | |
| end | |
| def peek | |
| @store.last | |
| end | |
| def empty? | |
| @store.empty? | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment