An opinionated implementation of the Command pattern for Ruby applications. Cuprum wraps your business logic in a consistent, object-oriented interface and features status and error management, composability and control flow management.
Error returned when a Command is called without defining a #process method.
TYPE
= 'cuprum.errors.command_not_implemented'
Short string used to identify the type of error.
#initialize(command:) => CommandNotImplemented
#command => Cuprum::Command (readonly)
#message => String (readonly)
#type => String (readonly)
#==(other) => Boolean
#as_json => Hash<String, Object>
Generates a serializable representation of the error object.
By default, contains the #type and #message properties and an empty :data Hash. This can be overridden in subclasses by overriding the private method #as_json_data; this should always return a Hash with String keys and whose values are basic objects or data structures of the same.
Back to Documentation | Reference | Cuprum | Cuprum::Errors