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 = {}) ⇒ Command

Returns a new instance of Command.



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

def initialize(name, description, arguments = {})
    @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:



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

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



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

def description
  @description
end

#nameSymbol (readonly)

Returns the command name.

Returns:

  • (Symbol)

    the command name



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

def name
  @name
end

Instance Method Details

#droby_dump(peer) ⇒ Object



20
21
22
# File 'lib/roby/interface/command.rb', line 20

def droby_dump(peer)
    self
end