Cuprum

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.

Class: Cuprum::Errors::OperationNotCalled

Parent Namespace
Cuprum::Errors
Inherited Classes
Cuprum::Error > Object
Defined In
lib/cuprum/errors/operation_not_called.rb

Table Of Contents

Overview

Error class to be used when trying to access the result of an uncalled Operation.

Back To Top

Constants

MESSAGE_FORMAT

= '%s was not called and does not have a result'

Format for generating error message.

TYPE

= 'cuprum.errors.operation_not_called'

Short string used to identify the type of error.

Back To Top

Constructor

#initialize(operation:) => OperationNotCalled

Parameters

Returns

Back To Top

Instance Attributes

#message => String (readonly)

Inherited From
Cuprum::Error

Returns

#operation => Cuprum::Operation (readonly)

Returns

#type => String (readonly)

Inherited From
Cuprum::Error

Returns

Back To Top

Instance Methods

#==(other) => Boolean

Inherited From
Cuprum::Error

Parameters

Returns

#as_json => Hash<String, Object>

Inherited From
Cuprum::Error

Generates a serializable representation of the error object.

By default, contains the #type and #message properties and an empty :data Hash. This can be overriden 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.

Returns

Back To Top


Back to Documentation | Versions | 1.0 | Reference | Cuprum | Cuprum::Errors