# File lib/abstract_controller/collector.rb, line 5 5: def self.generate_method_for_mime(mime) 6: sym = mime.is_a?(Symbol) ? mime : mime.to_sym 7: const = sym.to_s.upcase 8: class_eval def #{sym}(*args, &block) # def html(*args, &block) custom(Mime::#{const}, *args, &block) # custom(Mime::HTML, *args, &block) end # end, __FILE__, __LINE__ + 1 9: end
# File lib/abstract_controller/collector.rb, line 21 21: def method_missing(symbol, &block) 22: mime_constant = Mime.const_get(symbol.to_s.upcase) 23: 24: if Mime::SET.include?(mime_constant) 25: AbstractController::Collector.generate_method_for_mime(mime_constant) 26: send(symbol, &block) 27: else 28: super 29: end 30: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.