joshsaintjacque / JSQueue

A simple queue data structure in Ruby.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSQueue

A simple queue data structure in Ruby.

Installation

Install with

gem install JSQueue

Or in your gems file

gem 'JSQueue'

Usage

First, require the gem:

require 'JSQueue'

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

queue = JSQueue.new 'Something I need in the queue'

You can add items to the queue like so:

queue.enqueue ['an array', 'of things']

And you can remove and return a value from the front of the queue:

queue.dequeue
# => 'Something I need in the queue'

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 queue data structure in Ruby.

License:MIT License


Languages

Language:Ruby 100.0%