Class: Roby::Interface::Command
Overview
A command on an CommandLibrary
Instance Attribute Summary collapse
-
#arguments ⇒ Hash<Symbol,CommandArgument>
readonly
The set of arguments for this command.
-
#description ⇒ Array<String>
readonly
The command description.
-
#name ⇒ Symbol
readonly
The command name.
Instance Method Summary collapse
- #droby_dump(peer) ⇒ Object
-
#initialize(name, description, arguments = Hash.new) ⇒ Command
constructor
A new instance of Command.
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.(arguments) end |
Instance Attribute Details
#arguments ⇒ Hash<Symbol,CommandArgument> (readonly)
Returns the set of arguments for this command.
12 13 14 |
# File 'lib/roby/interface/command.rb', line 12 def arguments @arguments end |
#description ⇒ Array<String> (readonly)
Returns 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 |
#name ⇒ Symbol (readonly)
Returns 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 |