Custom delete method refactoring
Some notes:


An array is not the best data structure to store the words, operations will be O(n). Better a hash {word_id =&gt; word}
Use 2-space indentation.


Then you can write:

define_singleton_method(:delete) do |id|
  if @@words.delete(id)        
    Definition.delete_by_word_id(id)
  end
end