class Sequent::Core::Command

Most commonly used Command Command can be instantiated just by using:

Command.new(aggregate_id: "1", user_id: "joe")

But the Sequent::Core::Helpers::ParamSupport also enables Commands to be created from a params hash (like the one from Sinatra) as follows:

command = Command.from_params(params)

Private Class Methods

new(args = {}) click to toggle source
Calls superclass method Sequent::Core::BaseCommand::new
# File lib/sequent/core/command.rb, line 90
def initialize(args = {})
  fail ArgumentError, 'Missing aggregate_id' if args[:aggregate_id].nil?

  super
end