0.0
No commit activity in last 3 years
No release in over 3 years
Execute a command and the command bus will look up the proper handler class automatically and execute it
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

Simple command bus

Send it a command and it will search the root path for a command handler that can execute that command.

Convention

Commands are typical ruby symbols Command handlers must be classes name after the command and must end with 'CommandHandler'. They must also be in a file named after the command that must end with 'command_handler'

Example

bus = CommandBus.config do |config|
  config.root = 'lib/command_handlers'
end

bus.execute(:create_new_account)

In this example, command_bus will require 'lib/command_handlers/create_new_account_command_handler' and, instantiate the CreateNewAccountCommandHandler and call execute on it.