Module: Foobara::CommandPatternImplementation
- Includes:
- Concerns::Callbacks, Concerns::Description, Concerns::DomainMappers, Concerns::Entities, Concerns::Errors, Concerns::ErrorsType, Concerns::Inputs, Concerns::InputsType, Concerns::Namespace, Concerns::Reflection, Concerns::Result, Concerns::ResultType, Concerns::Runtime, Concerns::StateMachine, Concerns::Subcommands, Concerns::Transactions, Concern, TruncatedInspect
- Included in:
- Command, DomainMapper
- Defined in:
- foobara-0.0.110/projects/command/src/command_pattern_implementation.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/errors.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/inputs.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/result.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/runtime.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/entities.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/callbacks.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/namespace.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/reflection.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/description.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/errors_type.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/inputs_type.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/result_type.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/subcommands.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/transactions.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/state_machine.rb,
foobara-0.0.110/projects/command/src/command_pattern_implementation/concerns/domain_mappers.rb
Overview
We distinguish between “Foobara Command” and the “command pattern”.
A “Foobara Command” encapsulates a high-level business operation and serves as the public interface to its domain.
The “command pattern” encapsulates an operation behind an interface that supports .new(inputs), #run which returns an outcome which implements #success?, #result, and #errors.
All “Foobara Command”s implement the “command pattern” but not all implementations of the “command pattern” are “Foobara Command”s. An example is DomainMappers. They happen to use the “command pattern” since it is a good fit but has nothing to do with a public interface high-level business operation encapsulation like a “Foobara Command” does.
Defined Under Namespace
Modules: Concerns
Constant Summary
Constants included from TruncatedInspect
Instance Attribute Summary
Attributes included from Concerns::Subcommands
Attributes included from Concerns::Runtime
Attributes included from Concerns::Errors
Attributes included from Concerns::Inputs
Method Summary
Methods included from Concerns::Reflection
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Methods included from Concerns::DomainMappers
#domain_map, #domain_map!, #run_mapped_subcommand!
Methods included from Concerns::Subcommands
#run_subcommand!, #subcommand?
Methods included from Concerns::Entities
Methods included from Concerns::Transactions
#auto_detect_current_transactions, #commit_transaction, #open_transaction, #opened_transactions, #relevant_entity_classes, #rollback_transaction, #transactions
Methods included from Concerns::StateMachine
Methods included from Concerns::Runtime
#execute, #halt!, #run, #run!, #run_execute, #succeed, #success?, #validate, #validate_records
Methods included from Concerns::Errors
Methods included from 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