Class: Foobara::Command
- Inherits:
-
Object
- Object
- Foobara::Command
- Defined in:
- foobara-0.0.110/projects/command/src/command.rb,
foobara-0.0.110/projects/command/src/state_machine.rb,
foobara-0.0.110/projects/command/lib/foobara/command.rb,
foobara-0.0.110/projects/command/src/command/concerns/shortcut_for_run.rb
Direct Known Subclasses
Ai::AnswerBot::Ask, Ai::AnswerBot::ListModels, Ai::AnthropicApi::BaseCommand, Ai::OllamaApi::BaseCommand, Ai::OpenAiApi::BaseCommand, Auth::ApproveToken, Auth::BuildAccessToken, Auth::BuildSecret, Auth::CreateApiKey, Auth::CreateRefreshToken, Auth::CreateResetPasswordToken, Auth::CreateRole, Auth::CreateToken, Auth::CreateUser, Auth::FindUser, Auth::Login, Auth::Logout, Auth::RefreshLogin, Auth::Register, Auth::ResetPassword, Auth::SetPassword, Auth::VerifyAccessToken, Auth::VerifyPassword, Auth::VerifySecret, Auth::VerifyToken, Autocrud::AutocrudCommand, Autocrud::CreateCommands, Foobara::CommandConnector::Commands::Describe, Foobara::CommandConnector::Commands::ListCommands, Foobara::CommandConnector::Commands::Ping, Foobara::CommandConnector::Commands::QueryGitCommitInfo, Foobara::CommandConnectors::Http::Commands::GetOptions, Foobara::CommandConnectors::Http::Commands::Help, Foobara::CommandConnectors::ShCliConnector::Commands::Help, Generators::Generate, Generators::WriteGeneratedFilesToDisk, McpConnector::Commands::Initialize, McpConnector::Commands::Noop, RemoteCommand, RemoteImports::ImportCommand, RemoteImports::ImportDomain, RemoteImports::ImportError, RemoteImports::ImportOrganization, RemoteImports::ImportType
Defined Under Namespace
Modules: Concerns Classes: StateMachine
Constant Summary
Constants included from TruncatedInspect
Instance Attribute Summary
Attributes included from Foobara::CommandPatternImplementation::Concerns::Subcommands
Attributes included from Foobara::CommandPatternImplementation::Concerns::Runtime
Attributes included from Foobara::CommandPatternImplementation::Concerns::Errors
Attributes included from Foobara::CommandPatternImplementation::Concerns::Inputs
Class Method Summary collapse
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Methods included from Foobara::CommandPatternImplementation::Concerns::Reflection
Methods included from Foobara::CommandPatternImplementation::Concerns::DomainMappers
#domain_map, #domain_map!, #run_mapped_subcommand!
Methods included from Foobara::CommandPatternImplementation::Concerns::Subcommands
#run_subcommand!, #subcommand?
Methods included from Foobara::CommandPatternImplementation::Concerns::Entities
Methods included from Foobara::CommandPatternImplementation::Concerns::Transactions
#auto_detect_current_transactions, #commit_transaction, #open_transaction, #opened_transactions, #relevant_entity_classes, #rollback_transaction, #transactions
Methods included from Foobara::CommandPatternImplementation::Concerns::StateMachine
Methods included from Foobara::CommandPatternImplementation::Concerns::Runtime
#execute, #halt!, #run, #run!, #run_execute, #succeed, #success?, #validate, #validate_records
Methods included from Foobara::CommandPatternImplementation::Concerns::Errors
Methods included from Foobara::CommandPatternImplementation::Concerns::Inputs
#cast_and_validate_inputs, #initialize, #method_missing, #respond_to_missing?, #respond_to_missing_for_inputs?
Methods included from TruncatedInspect
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Foobara::CommandPatternImplementation::Concerns::Inputs
Class Method Details
.install! ⇒ Object
7 8 9 |
# File 'foobara-0.0.110/projects/command/lib/foobara/command.rb', line 7 def install! Namespace.global.(:command, self) end |
.reset_all ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'foobara-0.0.110/projects/command/lib/foobara/command.rb', line 11 def reset_all to_delete = [] all.each do |command_class| if command_class.name.include?("::") parent_name = Util.parent_module_name_for(command_class.name) if Object.const_defined?(parent_name) command_class.undefine_command_named_function else to_delete << command_class end else command_class.undefine_command_named_function end end to_delete.each do |command_class| all.delete(command_class) end super end |