> For the complete documentation index, see [llms.txt](https://certil-remy.gitbook.io/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://certil-remy.gitbook.io/learn/scraping/untitled-14.md).

# Student Example 1: Refactoring CLI Gem

[Permalink](https://github.com/learn-co-curriculum/refactoring-cli-gem/blob/d3805aa227350556a6264736cc0286d0bffc0b4e/README.md)

### Join GitHub today

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

[Sign up](https://github.com/join?source=prompt-blob-show\&source_repo=learn-co-curriculum%2Frefactoring-cli-gem)

&#x20;Branch: master

&#x20;[Find file](https://github.com/learn-co-curriculum/refactoring-cli-gem/find/master) Copy path

## &#x20;[refactoring-cli-gem](https://github.com/learn-co-curriculum/refactoring-cli-gem)/**README.md** <a href="#blob-path" id="blob-path"></a>

&#x20;[Find file](https://github.com/learn-co-curriculum/refactoring-cli-gem/find/master) Copy path

&#x20;Fetching contributors…

![](https://github.githubassets.com/images/spinners/octocat-spinner-32-EAF2F5.gif) Cannot retrieve contributors at this time

&#x20;18 lines (10 sloc) 715 Bytes

[Raw](https://github.com/learn-co-curriculum/refactoring-cli-gem/raw/master/README.md) [Blame](https://github.com/learn-co-curriculum/refactoring-cli-gem/blame/master/README.md) [History](https://github.com/learn-co-curriculum/refactoring-cli-gem/commits/master/README.md)

## Objectives:

* Refactoring a gem.
* Delegating responsibility to the appropriate class.

## Video

&#x20;\<iframe width="100%" height="720" src="<https://www.youtube.com/embed/JEL_PXr74qQ?rel=0&showinfo=0>" frameborder="0" allowfullscreen>\</iframe>

[MP4](http://learn-co-videos.s3.amazonaws.com/cli/cli-refactor.mp4)

[Original Code](https://github.com/aviflombaum/museum-shows/tree/master)

[Refactored Code](https://github.com/aviflombaum/museum-shows/tree/refactored)

[Diff](https://github.com/aviflombaum/museum-shows/pull/1/files?diff=unified)

View [Refactoring CLI Gem](https://learn.co/lessons/refactoring-cli-gem) on Learn.co and start learning to code for free.
