require 'csv' module ErrandBoy class CSV class << self def build(request) provider = request.provider.capitalize action = request.action.capitalize const_get("#{provider}#{action}").new(request) rescue raise NoActionError, "No such provider or action `#{provider}`, `#{action}`." end def dir File.expand_path 'index' end end end end