Class | Termtter::Command
In: | lib/termtter/command.rb
Parent: | Object

### Methods

alias aliases= author= call command_words commands complement match? new pattern set split_command_line

### Attributes

aliases | [RW] |
author | [RW] |
completion_proc | [RW] |
exec_proc | [RW] |
help | [RW] |
name | [RW] |

### Public Class methods

new(args)

args

      name:            (required) Symbol as command name
      aliases:         Array of command alias (ex. ['u', 'up'])
      exec_proc:       Proc for procedure of the command. If need the proc must return object for hook.
      completion_proc: Proc for input completion. The proc must return Array of candidates (Optional)
      help:            Help text for the command (Optional)
      author:          The author's name (Optional)

### Public Instance methods

alias(=(a))

call-seq:

      alias= :: Symbol -> ()

aliases=(as)
author=(a)

call-seq:

      author= :: String -> ()

call(cmd = nil, arg = nil, original_text = nil)

call-seq:

      call :: ???

command_words()
commands()

call-seq:

      commands :: [Symbol]

complement(input)

call-seq:

      complement :: String -> [String]

match?(input)

call-seq:

      match? :: String -> Boolean

pattern()

call-seq:

      pattern :: Regexp

set(cfg)

call-seq:

      set :: Hash -> ()

split_command_line(line)

call-seq:

      split_command_line :: String -> (String, String)

[Validate]