Method: GitHub#command

Defined in:
lib/github.rb

#command(command, &block) ⇒ Object



26
27
28
29
30
31
32
33
34
35
# File 'lib/github.rb', line 26

def command(command, &block)
  debug "Registered `#{command}`"
  descriptions[command] = @next_description if @next_description
  @next_description = nil
  flag_descriptions[command].update @next_flags if @next_flags
  usage_descriptions[command] = @next_usage if @next_usage
  @next_flags = nil
  @next_usage = []
  commands[command.to_s] = Command.new(block)
end