Class: Fourchan::Kit::CLI

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) download



13
14
15
16
17
18
19
20
21
22
# File 'lib/fourchan/kit/cli.rb', line 13

def download
  url, file = options[:url], options[:file]
  if url
    Fourchan::Kit::Tools.download_thread(url, options.dup)
  elsif file
    Fourchan::Kit::Tools.download_threads(file, options.dup)
  else
    puts "I need some input to download the images. See `fourgem help download` for options."
  end
end

- (Object) lurk(thread)



32
33
34
# File 'lib/fourchan/kit/cli.rb', line 32

def lurk(thread)
  options[:refresh] >= 5 ? Fourchan::Kit::Tools.lurk(thread, options.dup) : puts("Be fair, have refresh >= 5")
end