Leave a comment

Refactoring with Rubocop


Awesome, awesome, awesome. I thought it was going to be a pun. Thanks for enlightening me to Rubocop!!

Project Ramon

lunch_panoply6_header_img_prod

Hello and happy Monday!

I first wanted to thank the various people who have showed support for my TDD series last week, I sincerely appreciate the re-tweets and favorites!

Over the weekend, while perusing the web I stumbled upon Rubocop. Running Rubocop looks a lot like running Rspec or Test::Unit in our terminal. Instead of running our specs though, Rubocop will generate ‘cops’ alerting us to various style-guide offenses, the gem even has an auto correct feature in experimentation at the moment. My thoughts in two words or less about Rubocop, pretty sweet! Lets take a look at how to use Rubocop as I attempt to refactor lunch_panoply and see if we can’t clean up some of the rough edges.

Rubocop Setup

The setup is extremely easy, all we do is type gem install rubocop from our command-line, or if you’re using Bundler you can add gem 'rubocop' to…

View original post 523 more words

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: