Class: Roby::Interface::Command

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

Overview

A command on an CommandLibrary

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, description, arguments = Hash.new) ⇒ Command

Returns a new instance of Command.



14
15
16
# File 'lib/roby/interface/command.rb', line 14

def initialize(name, description, arguments = Hash.new)
    @name, @description, @arguments = name, Array(description), Kernel.normalize_options(arguments)
end

Instance Attribute Details

#argumentsHash<Symbol,CommandArgument> (readonly)

Returns the set of arguments for this command.

Returns:



12
13
14
# File 'lib/roby/interface/command.rb', line 12

def arguments
  @arguments
end

#descriptionArray<String> (readonly)

Returns the command description. The first element of the array is used as a command summary.

Returns:

  • (Array<String>)

    the command description. The first element of the array is used as a command summary



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

def description
  @description
end

#nameSymbol (readonly)

Returns the command name.

Returns:

  • (Symbol)

    the command name



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

def name
  @name
end

Instance Method Details

#droby_dump(peer) ⇒ Object



18
19
20
# File 'lib/roby/interface/command.rb', line 18

def droby_dump(peer)
    self
end