22 Sep '12, 12pm

Write ruby code analyzer tool by yourself, extracted by rails_best_practices gem

code_analyzer gem is extracted from rails_best_practices , its aim is to provide a simple way to build your own ruby code analyzer tool. Quick Start 1. create ruby file you want to analyze. Let's create a simple ruby file test_class.rb , its content is as follow. class TestClass # bad def TestClass.some_method # body omitted end # good def self.some_other_method # body omitted end end The code is picked from github ruby styleguide , let's write a code analyzer script to detect bad style. TestClass.some_method 2. understand the corresponding sexp you need to analyze. code_analyzer is analyzing sexp which is generated by ruby ripper, you should have a basic idea of what sexp is. I have built a website try-ripper , which helps you easily understand sexp. Copy the source code of test_class.rb to "Ruby Code" textarea, and click "Convert" button, then you will see the correspond...

Full article: http://flyerhzm.github.com/code_analyzer/

Tweets

write ruby code analyzer tool by yourself

rubyflow.com 22 Sep '12, 1pm

write ruby code analyzer tool by yourself Posted by flyerhzm on September 22, 2012 — 0 comments I'm working on extracting ...

rails_best_practices 1.11.0 released

rubyflow.com 22 Sep '12, 1pm

rails_best_practices 1.11.0 released Posted by flyerhzm on September 22, 2012 — 0 comments I just released rails_best_prac...

This Car Runs on Code via @IEEESpectrum, see al...

spectrum.ieee.org 23 Sep '12, 4pm

The avionics system in the F-22 Raptor, the current U.S. Air Force frontline jet fighter, consists of about 1.7 million li...

Why You Should Use the New Google Remarketing Code

Why You Should Use the New Google Remarketing Code

searchenginewatch.com 26 Sep '12, 1pm

For those who are new to the party, Google remarketing provides marketers with an opportunity to stay engaged with users w...

Ruby on Rails Devise gem: I am trying to use th...

stackoverflow.com 23 Sep '12, 1pm

I am trying to use the devise gem for my rails 3.2 project but when i am trying to check for the sign_in page i am getting...

What does it mean to say that code must work al...

electronicdesign.com 27 Sep '12, 6pm

Everyone knows that we are becoming more and more dependent on computer software. Our lives can be upended (or even ended)...