Method: Command::Inspect#execute

Defined in:
lib/command/inspect.rb

#execute(argv) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/command/inspect.rb', line 32

def execute(argv)
  super
  if argv.empty?
    latest_id = Inventory.load("latest_convert", :local)["id"]
    if latest_id
      data = Downloader.get_data_by_target(latest_id)
      display_log(data["title"])
    end
    return
  end
  tagname_to_ids(argv)
  argv.each_with_index do |target, i|
    Helper.print_horizontal_rule if i > 0
    data = Downloader.get_data_by_target(target)
    unless data
      error "#{target} は存在しません"
      next
    end
    display_log(data["title"])
  end
end