Sha256: 3f293a6f441828aa3b605a78408de656d2f81b254839d71b94a3a867ffa05f72

Contents?: true

Size: 871 Bytes

Versions: 19

Compression:

Stored size: 871 Bytes

Contents

# frozen_string_literal: true

#
# Copyright 2013 whiteleaf. All rights reserved.
#

require_relative "../helper"

module Command
  class Folder < CommandBase
    def self.oneline_help
      "小説の保存フォルダを開きます"
    end

    def initialize
      super("<target> [<target2> ...]")
      @opt.separator <<-EOS

  ・指定した小説の保存フォルダを開きます。

  Examples:
    narou folder n9669bk
    narou folder musyoku
    narou folder 0
    narou f 0
      EOS
    end

    def execute(argv)
      super
      display_help! if argv.empty?
      tagname_to_ids(argv)
      argv.each do |target|
        dir = Downloader.get_novel_data_dir_by_target(target)
        if dir
          Helper.open_directory(dir)
          puts dir
        else
          error "#{target} は存在しません"
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
narou-3.7.1 lib/command/folder.rb
narou-3.7.0 lib/command/folder.rb
narou-3.6.0 lib/command/folder.rb
narou-3.5.1 lib/command/folder.rb
narou-3.5.0.1 lib/command/folder.rb
narou-3.5.0 lib/command/folder.rb
narou-3.4.8 lib/command/folder.rb
narou-3.4.7.1 lib/command/folder.rb
narou-3.4.7 lib/command/folder.rb
narou-3.4.6.1 lib/command/folder.rb
narou-3.4.6 lib/command/folder.rb
narou-3.4.5 lib/command/folder.rb
narou-3.4.3 lib/command/folder.rb
narou-3.4.2 lib/command/folder.rb
narou-3.4.1 lib/command/folder.rb
narou-3.4.0 lib/command/folder.rb
narou-3.3.2 lib/command/folder.rb
narou-3.3.1 lib/command/folder.rb
narou-3.3.0 lib/command/folder.rb