Class: Foobara::Agent::ListCommands
- Defined in:
- foobara-agent-0.1.0/src/foobara/agent/list_commands.rb
Constant Summary
Constants included from TruncatedInspect
Instance Attribute Summary collapse
-
#command_lists ⇒ Object
Returns the value of attribute command_lists.
Instance Method Summary collapse
Methods inherited from Command
Methods included from TruncatedInspect
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Instance Attribute Details
#command_lists ⇒ Object
Returns the value of attribute command_lists.
21 22 23 |
# File 'src/foobara/agent/list_commands.rb', line 21 def command_lists @command_lists end |
Instance Method Details
#construct_command_lists ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'src/foobara/agent/list_commands.rb', line 23 def construct_command_lists user_provided_commands = [] agent_specific_commands = [] command_connector.all_transformed_command_classes.each do |command_class| if command_class.domain == Foobara::Agent agent_specific_commands else user_provided_commands end << command_class.full_command_name end self.command_lists = { user_provided_commands:, agent_specific_commands: } end |
#execute ⇒ Object
15 16 17 18 19 |
# File 'src/foobara/agent/list_commands.rb', line 15 def execute construct_command_lists command_lists end |