A simple gem that let's you shuffle an array with a ~

gaurav eb2f4afec2 Added bundle install instructions .. 4 months ago
lib f526da0248 #1: Created sample gem ruby .. 5 months ago
.gitignore 99bf0b749f Initial commit 5 months ago
README.md eb2f4afec2 Added bundle install instructions .. 4 months ago
tilde_array_shuffler.gemspec f526da0248 #1: Created sample gem ruby .. 5 months ago

README.md

tilde_array_shuffler

A simple gem created to demonstrate the process of creating a ruby gem.

This is a simple gem that lets you shuffle an array with a ~

Build

Once you have created the gemspec file with all the required and relevant information, you can build the gem with the following command

$ gem build tilde_array_shuffler.gemspec
Successfully built RubyGem
Name: tilde_array_shuffler
Version: 0.0.1
File: tilde_array_shuffler-0.0.1.gem

Install

Once built, you can install the gem locally

$ gem install tilde_array_shuffler
Successfully installed tilde_array_shuffler-0.0.1
1 gem installed

Bundle install

To install with bundler, add this to the Gemfile

gem 'tilde_array_shuffler', git: 'https://git.victorcode.com/gaurav/tilde_array_shuffler'

Then run bundle install

Usage

> require 'tilde_array_shuffler'

> ~[1,2,3]
[2,1,3]