Sha256: 21f3a454d90115d7315016c537a1829e511e31eb2afdca71648566e015145401

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

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

require "optparse"
require_relative "commandbase"
Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), "command", "*.rb"))) do |path|
  require path
end

module Command
  #
  # コマンド一覧を取得
  #
  def self.get_list
    COMMAND_LIST
  end

  COMMAND_LIST = {
    "download" => Download.new,
    "update" => Update.new,
    "list" => List.new,
    "convert" => Convert.new,
    "diff" => Diff.new,
    "setting" => Setting.new,
    "alias" => Alias.new,
    "inspect"=> Inspect.new,
    "send" => Send.new,
    "folder" => Folder.new,
    "browser" => Browser.new,
    "remove" => Remove.new,
    "freeze" => Freeze.new,
    "mail" => Mail.new,
    "help" => Help.new,
    "version" => Version.new,
    #"new" => New.new,
    #"interactive" => Interactive.new,
    "init" => Init.new
  }

  # ショートカット定義
  # COMMAND_LIST の上から順に優先度が高い
  Shortcuts = Hash[*get_list.keys.reverse.map { |s|
    [s[0], s, s[0..1], s]
  }.flatten]
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
narou-1.5.5.1 lib/command.rb
narou-1.5.5 lib/command.rb
narou-1.5.4 lib/command.rb
narou-1.5.3 lib/command.rb
narou-1.5.2.1 lib/command.rb
narou-1.5.2 lib/command.rb