Class: Hanami::CLI::Command
- Inherits:
 - 
      Object
      
        
- Object
 - Hanami::CLI::Command
 
 
- Extended by:
 - Forwardable
 
- Defined in:
 - gems/gems/hanami-cli-0.3.1/lib/hanami/cli/command.rb
 
Overview
Base class for commands
Class Method Summary collapse
- 
  
    
      .argument(name, options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Specify an argument.
 - 
  
    
      .desc(description)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Set the description of the command.
 - 
  
    
      .example(*examples)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Describe the usage of the command.
 - 
  
    
      .option(name, options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Command line option (aka optional argument).
 
Class Method Details
.argument(name, options = {}) ⇒ Object
Specify an argument
Source: | on GitHub
        def self.argument(name, = {}) @arguments << Argument.new(name, ) end  | 
    
.desc(description) ⇒ Object
Set the description of the command
Source: | on GitHub
        def self.desc(description) @description = description end  | 
    
.example(*examples) ⇒ Object
Describe the usage of the command
Source: | on GitHub
        def self.example(*examples) @examples += examples.flatten end  | 
    
.option(name, options = {}) ⇒ Object
Command line option (aka optional argument)
Source: | on GitHub
        def self.option(name, = {}) @options << Option.new(name, ) end  |