Class: Yes::Core::Aggregate::Dsl::MethodDefiners::Command::Base Abstract
- Inherits:
-
Object
- Object
- Yes::Core::Aggregate::Dsl::MethodDefiners::Command::Base
- Defined in:
- lib/yes/core/aggregate/dsl/method_definers/command/base.rb
Overview
This class is abstract.
Subclass and override #call to implement custom command method definition
Base class for command method definers that provides common functionality for defining command-related methods on aggregate classes.
Direct Known Subclasses
Instance Method Summary collapse
-
#call ⇒ void
abstract
Defines the command-related methods on the aggregate class.
-
#initialize(command_data) ⇒ Base
constructor
Initializes a new command method definer.
Constructor Details
#initialize(command_data) ⇒ Base
Initializes a new command method definer
19 20 21 22 |
# File 'lib/yes/core/aggregate/dsl/method_definers/command/base.rb', line 19 def initialize(command_data) @name = command_data.name @aggregate_class = command_data.aggregate_class end |
Instance Method Details
#call ⇒ void
This method is abstract.
This method returns an undefined value.
Defines the command-related methods on the aggregate class
29 30 31 |
# File 'lib/yes/core/aggregate/dsl/method_definers/command/base.rb', line 29 def call raise NotImplementedError, "#{self.class} must implement #call" end |