Class: Cmdlib::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/cmdlib/command.rb

Overview

Class for create command object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommand

Returns a new instance of Command.



11
12
13
14
# File 'lib/cmdlib/command.rb', line 11

def initialize
  @describe = Describe.new
  @argnum = nil
end

Instance Attribute Details

#argnumObject

Numbers of required arguments.



9
10
11
# File 'lib/cmdlib/command.rb', line 9

def argnum
  @argnum
end

#describeObject

Contain object with describe text.



6
7
8
# File 'lib/cmdlib/command.rb', line 6

def describe
  @describe
end

Instance Method Details

#handlerObject



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

def handler
  puts "fatal error: do not set handler for '#{@describe.oname}' command."
end