Module: Command

Defined in:
lib/command/new.rb,
lib/command.rb,
lib/commandbase.rb,
lib/command/diff.rb,
lib/command/help.rb,
lib/command/init.rb,
lib/command/list.rb,
lib/command/send.rb,
lib/command/alias.rb,
lib/command/folder.rb,
lib/command/freeze.rb,
lib/command/remove.rb,
lib/command/update.rb,
lib/command/browser.rb,
lib/command/convert.rb,
lib/command/inspect.rb,
lib/command/setting.rb,
lib/command/version.rb,
lib/command/download.rb,
lib/command/interactive.rb

Overview

Copyright 2013 whiteleaf. All rights reserved.

Defined Under Namespace

Classes: Alias, Browser, CommandBase, Convert, Diff, Download, Folder, Freeze, Help, Init, Inspect, Interactive, List, New, Remove, Send, Setting, Update, Version

Constant Summary collapse

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,
  "help" => Help.new,
  "version" => Version.new,
  #"new" => New.new,
  #"interactive" => Interactive.new,
  "init" => Init.new
}
Shortcuts =

ショートカット定義 COMMAND_LIST の上から順に優先度が高い

Hash[*get_list.keys.reverse.map { |s|
[s[0], s, s[0..1], s]

Class Method Summary collapse

Class Method Details

.get_listObject

コマンド一覧を取得



16
17
18
# File 'lib/command.rb', line 16

def self.get_list
  COMMAND_LIST
end