A simple stack data structure in Ruby.
Install with
gem install JSStack
Or in your gems file
gem 'JSStack'
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'
View the full docs at here.
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.