Sha256: 72d7061bc71bc82b9f3da58501a6f31a267fefc05c696d1e12b563a8a2ad8d9e

Contents?: true

Size: 890 Bytes

Versions: 19

Compression:

Stored size: 890 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
    narou f 0
      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

19 entries across 19 versions & 1 rubygems

Version Path
narou-1.5.11 lib/command/folder.rb
narou-1.5.10.1 lib/command/folder.rb
narou-1.5.10 lib/command/folder.rb
narou-1.5.9 lib/command/folder.rb
narou-1.5.8 lib/command/folder.rb
narou-1.5.7.1 lib/command/folder.rb
narou-1.5.7 lib/command/folder.rb
narou-1.5.6.1 lib/command/folder.rb
narou-1.5.6 lib/command/folder.rb
narou-1.5.5.1 lib/command/folder.rb
narou-1.5.5 lib/command/folder.rb
narou-1.5.4 lib/command/folder.rb
narou-1.5.3 lib/command/folder.rb
narou-1.5.2.1 lib/command/folder.rb
narou-1.5.2 lib/command/folder.rb
narou-1.5.1 lib/command/folder.rb
narou-1.5.0.2 lib/command/folder.rb
narou-1.5.0.1 lib/command/folder.rb
narou-1.5.0 lib/command/folder.rb