COMMANDOES
Commandoes is a project designed to help any ruby app use the command pattern to change state.
PREREQUISITES
- ruby-2.3.1
DEPENDENCIES
- ActiveModel::Validations
INSTALLATION
In your Gemfile
gem 'commandoes'
EXAMPLES
PLUGINS
Commandoes uses a plugin system similar to sequel or roda to extend the behavior of your command objects.
EXAMPLE OF A CUSTOM PLUGIN
module Commandoes
module Plugins
module ExamplePlugin
module ClassMethods
end
module InstanceMethods
end
end
end
end
Any method in the ClassMethods
module will be injected into the IAmACommand
class. Any method in the InstanceMethods
module will be injected into
instances of IAmACommand
objects.
Commandoes::Plugins::ActiveModelPlugin
This plugin is used to give commands active model like validation behavior.