# frozen_string_literal: true # # frozen_string_literal: true module Wayfarer module CLI class Route < Base desc "result JOB URL", "Invoke JOB's router with URL" def result(job, url) load_environment url = URI(url) job = job.classify.constantize puts Wayfarer::Routing::PathFinder.result(job.route, url) end desc "tree JOB URL", "Visualize JOB's routing tree for URL" def tree(job, url) load_environment url = URI(url) job = job.classify.constantize Wayfarer::CLI::RoutePrinter.print(job.route, url) end end end end