joshsaintjacque / JSStack

A simple stack data structure in Ruby.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSStack

A simple stack data structure in Ruby.

Installation

Install with

gem install JSStack

Or in your gems file

gem 'JSStack'

Usage

First, require the gem:

require 'JSStack'

You can create new stacks with any datatype you'd like. Just do:

stack = JSStack.new 'This will be first on the stack'

You can add items to the stack like so:

stack.push 'This will be placed on top of the stack'

And you can remove and return a value from the top of the stack:

stack.pop
# => 'This will be placed on top of the stack'

Documentation

View the full docs at here.

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

About

A simple stack data structure in Ruby.

License:MIT License


Languages

Language:Ruby 100.0%