module AbstractController::Collector

def self.generate_method_for_mime(mime)

def self.generate_method_for_mime(mime)
  sym = mime.is_a?(Symbol) ? mime : mime.to_sym
  class_eval <<-RUBY, __FILE__, __LINE__ + 1
    def #{sym}(*args, &block)
      custom(Mime[:#{sym}], *args, &block)
    end
    ruby2_keywords(:#{sym})
  RUBY
end