class Eventusha::CommandHandler

Attributes

command[R]

Public Class Methods

aggregate(aggregate_name) click to toggle source
# File lib/eventusha/command_handler.rb, line 14
def self.aggregate(aggregate_name)
        define_method :aggregate do
    "Aggregates::#{aggregate_name.to_s.classify}".constantize
  end
end
execute(command) click to toggle source
# File lib/eventusha/command_handler.rb, line 9
def self.execute(command)
  handler = new(command)
  handler.execute
end
new(command) click to toggle source
# File lib/eventusha/command_handler.rb, line 5
def initialize(command)
  @command = command
end