Class: Tansaku::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/tansaku/cli.rb

Instance Method Summary collapse

Instance Method Details

#crawl(url) ⇒ Object



13
14
15
16
17
18
# File 'lib/tansaku/cli.rb', line 13

def crawl(url)
  params = options.compact.map { |k, v| [k.to_sym, v] }.to_h
  crawler = Crawler.new(url, params)
  results = crawler.crawl
  puts results.to_json
end