# File lib/scruffy/formatters.rb, line 31 def route_format(target, idx, options = {}) args = [target, idx, options] if respond_to?(:format) send :format, *args[0...self.method(:format).arity] elsif respond_to?(:format!) send :format!, *args[0...self.method(:format!).arity] target else raise NameError, "Formatter subclass must container either a format() method or format!() method." end end