Skip to Content Skip to Search
Methods
G

Class Public methods

generate_method_for_mime(mime)

# File actionpack/lib/abstract_controller/collector.rb, line 7
    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