Module: Command

Defined in:
lib/command/web.rb,
lib/command.rb,
lib/command/csv.rb,
lib/command/tag.rb,
lib/commandbase.rb,
lib/command/diff.rb,
lib/command/help.rb,
lib/command/init.rb,
lib/command/list.rb,
lib/command/mail.rb,
lib/command/send.rb,
lib/command/alias.rb,
lib/command/backup.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

Overview

Copyright 2013 whiteleaf. All rights reserved.

Defined Under Namespace

Classes: Alias, Backup, Browser, CommandBase, Convert, Csv, Diff, Download, Folder, Freeze, Help, Init, Inspect, List, Mail, Remove, Send, Setting, Tag, Update, Version, Web

Constant Summary collapse

COMMAND_LIST =

この順番がヘルプに表示される順番

{
  "download" => Download,
  "update" => Update,
  "list" => List,
  "convert" => Convert,
  "diff" => Diff,
  "setting" => Setting,
  "alias" => Alias,
  "inspect"=> Inspect,
  "send" => Send,
  "folder" => Folder,
  "browser" => Browser,
  "remove" => Remove,
  "freeze" => Freeze,
  "tag" => Tag,
  "web" => Web,
  "mail" => Mail,
  "backup" => Backup,
  "csv" => Csv,
  "help" => Help,
  "version" => Version,
  "init" => Init
}
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