AbstractController::Collector Ruby on Rails 5.1.2 Module AbstractController::Collector actionpack/lib/abstract_controller/collector.rb Namespace MODULE AbstractController::Collector::Mime Methods G generate_method_for_mime Class Public methods generate_method_for_mime(mime) Link Source: show | on GitHub # File actionpack/lib/abstract_controller/collector.rb, line 5 def self.generate_method_for_mime(mime) sym = mime.is_a?(Symbol) ? mime : mime.to_sym class_eval " def #{sym}(*args, &block) custom(Mime[:#{sym}], *args, &block) end ", __FILE__, __LINE__ + 1 end