juliatan / inject_method

Part of the Ruby challenge at the end of Week 4 @makersacademy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recreation of the inject method for Arrays

Part of the challenge set at the end of Week 4 at Makers Academy was to recreate the Array method, inject. To aid my learning, I also decided to recreate a few other methods within the Array class.

Objective

  • Gain a deeper understanding of how Ruby methods work
  • Practice using Blocks in Ruby

Technologies used

  • Ruby
  • RSpec

How to use

git clone git@github.com:juliatan/inject_method.git
cd inject_method
irb
require './lib/blocks'

Test the various methods I have rewritten, e.g.

[1,2,3].reduce2(:+)

How to run tests

cd inject_method
rspec

About

Part of the Ruby challenge at the end of Week 4 @makersacademy


Languages

Language:Ruby 100.0%