def visit(item)
      item_name = item_name(item)

      method = "visit_#{item_name}"
      send(method, item) if respond_to? method
    end
def visit(item)
      item_name = item_name(item)

      method = "visit_#{item_name}"
      send(method, item) if respond_to? method
    end
This is called when a visitor is visiting a
 visitable item.

 By default this method calls the method
 `visit_<visitable classname>` so make sure
 you've created a method for each visitable you
 intend to visit.

 @param [Visitable] visitable
                    the visitable item the visitor is visiting