Class: Wayfarer::CLI::Route

Inherits:
Base
  • Object
show all
Defined in:
lib/wayfarer/cli/route.rb

Instance Method Summary collapse

Methods inherited from Base

source_root

Instance Method Details

#result(job, url) ⇒ Object



10
11
12
13
14
15
# File 'lib/wayfarer/cli/route.rb', line 10

def result(job, url)
  load_environment
  url = URI(url)
  job = job.classify.constantize
  puts Wayfarer::Routing::PathFinder.result(job.route, url)
end

#tree(job, url) ⇒ Object



19
20
21
22
23
24
# File 'lib/wayfarer/cli/route.rb', line 19

def tree(job, url)
  load_environment
  url = URI(url)
  job = job.classify.constantize
  Wayfarer::CLI::RoutePrinter.print(job.route, url)
end