This is a little confusing to me where you're checking to see if `cell_element` response to name.  You check to see if it responds to name, but you don't actually care if it has a name property.  It seems like using `is_a?` here would be more appropriate because it seems like you care what kind of object it is rather than caring about what property the object has.  I think it would make the code more readable and more understandable later.