Class: Sequent::Core::BaseCommand
- Inherits:
-
Object
- Object
- Sequent::Core::BaseCommand
- Extended by:
- ActiveSupport::DescendantsTracker
- Includes:
- ActiveModel::Validations, ActiveModel::Validations::Callbacks, Helpers::AttributeSupport, Helpers::Copyable, Helpers::EqualSupport, Helpers::Mergable, Helpers::ParamSupport, Helpers::TypeConversionSupport, Helpers::UuidHelper
- Defined in:
- lib/sequent/core/command.rb
Overview
Base class for all Command’s.
Commands form the API of your domain. They are simple data objects with descriptive names of what they want to achieve. E.g. ‘SendInvoice`.
BaseCommand uses ‘ActiveModel::Validations` for validations
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ BaseCommand
constructor
A new instance of BaseCommand.
Methods included from Helpers::TypeConversionSupport
Methods included from Helpers::Copyable
Methods included from Helpers::AttributeSupport
#as_json, #attributes, #ensure_known_attributes, included, #update, #validation_errors
Methods included from Helpers::UuidHelper
Methods included from Helpers::EqualSupport
Methods included from Helpers::ParamSupport
#as_params, #from_params, included, #to_params
Methods included from Helpers::Mergable
Constructor Details
#initialize(args = {}) ⇒ BaseCommand
Returns a new instance of BaseCommand.
37 38 39 40 41 42 |
# File 'lib/sequent/core/command.rb', line 37 def initialize(args = {}) update_all_attributes args @created_at = Time.now _run_initialize_callbacks end |