Sha256: 921bcc9e52ac967aa767645cba636c256e1f7d278a16c80abd4fb18c17b64d1b

Contents?: true

Size: 875 Bytes

Versions: 31

Compression:

Stored size: 875 Bytes

Contents

# -*- coding: utf-8 -*-
#
# Copyright 2013 whiteleaf. All rights reserved.
#

require_relative "../helper"

module Command
  class Folder < CommandBase
    def initialize
      super("<target> [<target2> ...]")
      @opt.separator <<-EOS

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

  Example:
    narou folder n9669bk
    narou folder musyoku
      EOS
    end

    def execute(argv)
      super
      if argv.empty?
        puts @opt.help
        return
      end
      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

    def oneline_help
      "小説の保存フォルダを開きます"
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
narou-1.4.6 lib/command/folder.rb
narou-1.4.5 lib/command/folder.rb
narou-1.4.4 lib/command/folder.rb
narou-1.4.3 lib/command/folder.rb
narou-1.4.2.rc2 lib/command/folder.rb
narou-1.4.2.rc1 lib/command/folder.rb
narou-1.4.1.1 lib/command/folder.rb
narou-1.4.1 lib/command/folder.rb
narou-1.4.0 lib/command/folder.rb
narou-1.3.5.1 lib/command/folder.rb
narou-1.3.5 lib/command/folder.rb
narou-1.3.4 lib/command/folder.rb
narou-1.3.3 lib/command/folder.rb
narou-1.3.2 lib/command/folder.rb
narou-1.3.1 lib/command/folder.rb
narou-1.3.0.1 lib/command/folder.rb
narou-1.3.0 lib/command/folder.rb
narou-1.2.9 lib/command/folder.rb
narou-1.2.9.rc1 lib/command/folder.rb
narou-1.2.8 lib/command/folder.rb