class RailsBestPractices::Reviews::RemoveEmptyHelpersReview

Review a helper file to make sure it is not an empty moduel.

See the best practice details here rails-bestpractices.com/posts/2011/04/09/remove-empty-helpers/

Implementation:

Review process:

check all helper files, if the body of module is nil, then the helper file should be removed.

Protected Instance Methods

empty_body?(module_node) click to toggle source
# File lib/rails_best_practices/reviews/remove_empty_helpers_review.rb, line 27
def empty_body?(module_node)
  s(:bodystmt, s(:stmts_add, s(:stmts_new), s(:void_stmt)), nil, nil, nil) == module_node.body
end